|
For the HTTP functions, it's in the beginning the RESPONSE_HTTP_HEADER of
the verbose functions. For example.
select SUBSTRING(RESPONSE_HTTP_HEADER,1,24) from
table(qsys2.http_get_verbose('https://www.google.com'))
00001
{"HTTP_STATUS_CODE":200,
Or you can parse it out using JSON_VALUE.
select JSON_VALUE(RESPONSE_HTTP_HEADER,'$.HTTP_STATUS_CODE') from
table(qsys2.http_get_verbose('https://www.google.com'))
00001
200
From: MIDRANGE-L <midrange-l-bounces@xxxxxxxxxxxxxxxxxx> on behalf of Jay
Vaughn <jeffersonvaughn@xxxxxxxxx>
Date: Thursday, December 12, 2024 at 12:38 PM
To: Midrange Systems Technical Discussion <midrange-l@xxxxxxxxxxxxxxxxxx>
Subject: [EXTERNAL] qsys2.http_post - get http status code
Probably a long shot... but...
Using this function we are wanting to consume a service and then know the
http status code returned before having to interrogate the response.
Is this possible? Obviously not with this function but maybe by using one
of the underlying QSYS.QSQAXIS* srvpgms (like the one wrapped in
qsys2.http_post?
Any info in this array would be appreciated.
the use case is we simply want to loop and retry the consumption multiple
times if a http status 500+ code.
--
This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing list
To post a message email: MIDRANGE-L@xxxxxxxxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: https://lists.midrange.com/mailman/listinfo/midrange-l
or email: MIDRANGE-L-request@xxxxxxxxxxxxxxxxxx
Before posting, please take a moment to review the archives
at https://archive.midrange.com/midrange-l.
Please contact support@xxxxxxxxxxxxxxxxxxxx for any subscription related
questions.
As an Amazon Associate we earn from qualifying purchases.
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.