× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



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';

endif;

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';

endif;


-SK


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

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.

Mihael

As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:
Replies:

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

This mailing list archive is Copyright 1997-2024 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].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.