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

Re: [Ftpapi] help with example 14



I'm using this URL
https://wwwcie.ups.com/rest/TimeInTransit

Attached is the JSON that I'm sending. If I use http_req, I receive the error 'Only the http protocol is available'. See attached debug. But in Postman, I use https.

Am I missing something

Nancy

On Tue, Mar 9, 2021 at 9:29 PM Scott Klement <sk@xxxxxxxxxxxxxxxx> wrote:
Hi Nancy,

Unfortunately, I no longer do UPS shipments, so I'm not in a position to
test an updated UPS shipping example.  Perhaps one of the other list
members has one?

I would recommend using http_req() or http_string().
http_url_post/http_url_post_raw are old-school and more complex to use. 
If you post your Postman example, I could tell you how to do the same
thing with HTTPAPI.

--
Scott Klement
sk@xxxxxxxxxxxxxxxx


On 3/9/2021 10:01 AM, Nancy Kunde wrote:
> Is there an example similar to example 14 except in JSON?
>
> I need to get in transit from UPS but using JSON.  I was able to test
> it using POSTMAN but haven't  in RPG.   Would I use http_url_post or
> http_url_post_raw?  Do I use an encoder procedure?
>
> The JSON for UPS has the user & password in it.   So I know there is
> no authorization needed.
>
> Nancy
>
--
_______________________________________________
Ftpapi mailing list
Ftpapi@xxxxxxxxxxxxxxxxxxxxxx
http://scottklement.com/mailman/listinfo/ftpapi
HTTPAPI Ver 1.41 released 2020-06-05
NTLM Ver 1.4.0 released 2014-12-22
OS/400 Ver V7R1M0

New iconv() objects set, PostRem=819. PostLoc=0. ProtRem=819. ProtLoc=0
http_persist_open(): entered
http_long_ParseURL(): entered
SetError() #1: Only the http protocol is available!
http_close(): entered

Attachment: intransit_ups_2021-03-10-11.06.44.20.json
Description: application/json

-- 
_______________________________________________
Ftpapi mailing list
Ftpapi@xxxxxxxxxxxxxxxxxxxxxx
http://scottklement.com/mailman/listinfo/ftpapi