Hi Mihael,

The 2nd parameter to http_error() will give you the http response code if that's what you need?

http_error(*omit: myCode);

if (myCode = 404);

   dsply 'got 404 not found';


Is that what you're looking for?

Alternately, If you change your logic to use http_req() instead of http_string(), http_req() will directly return the code for anything besdies 200.  (200 means success).

myCode = http_req(...parameters...);

if myCode = 404;

   dsply 'got 404 not found';



On 2/25/2019 3:16 AM, Mihael wrote:

I am using Scott's HTTPAPI to make a request and that works fine. But how do I get the HTTP status of the last request? I am using http_string to make the request.

Thanks in advance.


This thread ...


Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2020 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].