Thank you!
-----Original Message-----
From: RPG400-L [mailto:rpg400-l-bounces@xxxxxxxxxxxxxxxxxx] On Behalf Of Charles Wilt
Sent: Wednesday, July 10, 2019 10:29 AM
To: RPG programming on IBM i <rpg400-l@xxxxxxxxxxxxxxxxxx>
Subject: Re: HTTPAPI Question
Take a look at
*+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
* http_header(): retrieve the value of an HTTP header
*
* name = (input) name of header to look for
* pos = (input/optional) position of header if there's
* more than one with the same name
*
* returns the value of the HTTP header, or '' if not found
*+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
D http_header PR 32500A varying
D name 256A varying const
D pos 10I 0 value options(*nopass)
Also can use an exit point..
** Header parse exit point:
** Allows you to examine the HTTP response chain received
** from the HTTP server.
**
** D parse_hdr_prot PR
** D HeaderData 2048A const
**
D HTTP_POINT_PARSE_HEADER...
D C 5
*+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
* http_xproc(): Register a procedure to be called back at
* a given exit point
*
* peExitPoint = exit point. Should be one of the constants
* HTTP_POINT_XXX defined in the HTTPAPI_H member
* peProc = address of procedure to call for this
* exit point. (pass *NULL to disable this point)
* peUserData = Pointer to user data. This will be passed
* to your call-back procedure. You can set it to
* *NULL if you don't need/want it.
*
* Returns -1 upon error, or 0 if successful
*+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
D http_xproc PR 10I 0
D peExitPoint 10I 0 value
D peProc * procptr value
D peUserData * value options(*nopass)
HTH,
Charles
On Wed, Jul 10, 2019 at 7:57 AM Greg Wilburn < gwilburn@xxxxxxxxxxxxxxxxxxxxxxx> wrote:
I'm working with a REST API that is returning "next page" information
in the HTTP header (instead of in the JSON payload)... is there a
procedure in HTTPAPI to retrieve that info?
Thx,
Greg
--
This is the RPG programming on IBM i (RPG400-L) mailing list To post a
message email: RPG400-L@xxxxxxxxxxxxxxxxxx To subscribe, unsubscribe,
or change list options,
visit: https://lists.midrange.com/mailman/listinfo/rpg400-l
or email: RPG400-L-request@xxxxxxxxxxxxxxxxxx
Before posting, please take a moment to review the archives at
https://archive.midrange.com/rpg400-l.
Please contact support@xxxxxxxxxxxx for any subscription related
questions.
Help support midrange.com by shopping at amazon.com with our affiliate
link: https://amazon.midrange.com
--
This is the RPG programming on IBM i (RPG400-L) mailing list To post a message email: RPG400-L@xxxxxxxxxxxxxxxxxx To subscribe, unsubscribe, or change list options,
visit:
https://lists.midrange.com/mailman/listinfo/rpg400-l
or email: RPG400-L-request@xxxxxxxxxxxxxxxxxx
Before posting, please take a moment to review the archives at
https://archive.midrange.com/rpg400-l.
Please contact support@xxxxxxxxxxxx for any subscription related questions.
Help support midrange.com by shopping at amazon.com with our affiliate link:
https://amazon.midrange.com
As an Amazon Associate we earn from qualifying purchases.