Hi Members,
We're using HTTPAPI http_url_post to post json data to a server.
We've been successful in using it (thanks!) but during debug/troubleshoot times, we'd like the ability to determine response codes and http headers.
Anyone know if there is a way to determine this?
From the documentation and other notes on this forum, I believe the rc will always provide the response code
* Returns -1 = error detected internally by HTTPAPI
* 0 = timeout while receiving data or connecting
* 1 = file retrieved successfully
* > 1 = HTTP response code indicating server's error reply
We are assuming 1 will always be a 200 response code?
Is there a way for us to read the http headers?
We understand http_error() also contains some information. What information is exactly concatenated here?
We're using HTTPAPI http_url_post to post json data to a server.
We've been successful in using it (thanks!) but during debug/troubleshoot times, we'd like the ability to determine response codes and http headers.
Anyone know if there is a way to determine this?
From the documentation and other notes on this forum, I believe the rc will always provide the response code
* Returns -1 = error detected internally by HTTPAPI
* 0 = timeout while receiving data or connecting
* 1 = file retrieved successfully
* > 1 = HTTP response code indicating server's error reply
We are assuming 1 will always be a 200 response code?
Is there a way for us to read the http headers?
We understand http_error() also contains some information. What information is exactly concatenated here?
Comment