Inexplicable 404 (Resource not found)

Discussions related to HTTPAPI (An HTTP Client Package for RPG programming.) http://www.scottklement.com/httpapi/
Post Reply
asomeillan
Posts: 1
Joined: Sat Mar 04, 2023 5:50 pm

Inexplicable 404 (Resource not found)

Post by asomeillan »

I am using the latest version of this service program (HTTPAPI) "http-api/1.45" and specifically the" http_req" sub procedure.

Pointing to 'https://apitest.cybersource.com/pts/v2/payments/' , using the POST protocol.

It is returning a 404 every single time (Resource not found).

A puzzling fact is that this will work just fine using any one of the following methods instead:
  • Curl directly from the PASE environment on the same IBM i box (Release 7.4).
  • Python script directly from the PASE environment on the same IBM i box (Release 7.4).
  • RPGLE using the QAXISC api's directly.
Any ideas as to why the http_req would return a 404 error when all the other methods listed above pointing to the same resource work as expected?

Thanks in advance for your help!
Scott Klement
Site Admin
Posts: 872
Joined: Sun Jul 04, 2021 5:12 am

Re: Inexplicable 404 (Resource not found)

Post by Scott Klement »

1.45 is not the current version -- but I don't think that's related to the problem.

The 404 message is coming from the server (HTTPAPI is just relaying it to you) it doesn't come from HTTPAPI itself. Most likely there is something different about the URL that you are passing to HTTPAPI vs the one you are using with the other tools.
Post Reply