[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: SV: http_url_post



   Hi Magne
   Thanks for help!
   I am not sure after I read libhttp/qrpgsrc.readme.
   Paragraph 9:

         You do not need to create or assign any certificates unless
          required by the business partner that you will be
          communicating with.  Usually this is only required when
          security is vital (such as when talking to a bank).
          Companies like UPS, for example, don't require you to send
          them any certificates.
   I do'nt to send UPS any certificates.
   I read exsample 3 that https_init() is used before http_url_post(). Is
   it correct way to solve the problem?
   c                   eval      rc = https_init(*BLANKS)

   c                   if        rc < 0
   c                   eval      msg = http_error(rc)
   c                   if        rc = HTTP_NOTREG
   c                   exsr      RegisterMe
   c                   return
   c                   else
   c                   dsply                   msg
   c                   return
   c                   endif
   c                   endif

   C**  The only diff between using HTTPS and using HTTP is
   C**  the URL that we pass.  It starts with 'https://'

   c                   eval      rc = http_url_get(
   c                                  'https://www.klements.com':
   c                                  '/tmp/httptest.html')
   c                   if        rc <> 1
   c                   eval      msg = http_error
   c                   dsply                   msg
   c                   return
   c                   endif
   Best regards
   Yang Bing Chang

      "Magne Kofoed" <ma-kofo@xxxxxxxxxxx>
      Sent by: ftpapi-bounces@xxxxxxxxxxxxxxxxxxxxxx

      01.02.2012 14:05

                        Please respond to
   HTTPAPI and FTPAPI Projects <ftpapi@xxxxxxxxxxxxxxxxxxxxxx>


                                                                        To

   "HTTPAPI and FTPAPI Projects" <ftpapi@xxxxxxxxxxxxxxxxxxxxxx>

                                                                        cc

                                                                   Subject

   SV: http_url_post

   Hi,
   take a look in src libhttp/qrpglesrc.readme.
   You will find the requirements for ssl support.
   Best regards,
   Magne Kofoed
   ________________________________
   Fra: ftpapi-bounces@xxxxxxxxxxxxxxxxxxxxxx på vegne av Bing@xxxxxxxxxx
   Sendt: on 01.02.2012 12:22
   Til: ftpapi@xxxxxxxxxxxxxxxxxxxxxx
   Emne: http_url_post
   Hi,
   I have a problem with http_url_post.
   When I use http url, it works good.
   rc = http_url_post(
             'http://wwwcie.ups.com/webservices/Ship'
                    : %addr(postData) + 2
                    : %len(postData)
                    : filename
                    : HTTP_TIMEOUT
                    : HTTP_USERAGENT
                     );
   But when I use https, I get error  "Only the http protocol is
   available".
   rc = http_url_post(
             'https://onlinetools.ups.com/webservices/Ship'
                    : %addr(postData) + 2
                    : %len(postData)
                    : filename
                    : HTTP_TIMEOUT
                    : HTTP_USERAGENT
                     );
   Does anybody know why?
   Best regards
   Yang Bing Chang
   -----------------------------------------------------------------------
   This is the FTPAPI mailing list.  To unsubscribe, please go to:
   [1]http://www.scottklement.com/mailman/listinfo/ftpapi
   -----------------------------------------------------------------------

References

   1. http://www.scottklement.com/mailman/listinfo/ftpapi

Attachment: winmail.dat
Description: Binary data

-----------------------------------------------------------------------
This is the FTPAPI mailing list.  To unsubscribe, please go to:
http://www.scottklement.com/mailman/listinfo/ftpapi
-----------------------------------------------------------------------