Help getting Agent to call cloud API with unique port


I’m getting a 404 response when I try to call my cloud API. If I put the URL in my browser/postman, I get a 200. My URL runs on a port other than 80. Is there a way to debug to make sure the agent is calling the right address with HTTPS, using the correct port, and resource? It isn’t clear in the Docs for the “http.put(URL, headers, body)” function the formatting of the URL when you have unique ports or encoding. The code is

const APIURL = “”;
local request = http.put(APIURL, {}, “”);

Looking into this; I don’t believe there should be a problem there but we’re verifying it now.

@SRose can you please privately send to me the actual URL that you are using? Thanks.

@SRose I’ve just tested this with the URL you provided by email. The results are consistent between the agent, Postman, and a web browser. GET requests return 404. PUT requests return 403, as expected.

@zandr That’s good news. Only PUT is allowed. However the http.put() call in my agent is returning a 404. Are you able to see my agent code? I’m working on getting logging from our servers…

I can’t see your agent code, no. I’ll contact you by email for it.
I think, though that the fact that I’m getting 403 with bogus auth means we’re hitting the right server:port, and it’s something about the request that isn’t quite right.

@zandr Case Closed. Figured it out! Thanks for all your help. My dev team got back. The api doc is wrong. It should be a Post, not a Put.