Retrieve next HTTP header.
WEB READNEXT HTTPHEADER
>>-WEB--READNEXT--HTTPHEADER(data-area)------------------------->
>--NAMELENGTH(data-area)--+-----------------------+------------->
'-SESSTOKEN(data-value)-'
>--VALUE(data-area)--VALUELENGTH(data-area)--------------------><
Conditions: ENDFILE, INVREQ, LENGERR, NOTOPEN
This command is threadsafe.
Description
WEB READNEXT HTTPHEADER retrieves
the next HTTP header in the list of headers. The SESSTOKEN option
is required if the HTTP header information is part of a response sent
to CICS as an HTTP client.
Options
- HTTPHEADER(data-area)
- specifies the buffer to contain the
name of the HTTP header being extracted.
- NAMELENGTH(data-area)
- specifies the length of the buffer
supplied on the HTTPHEADER option, as a fullword binary data area,
and is set to the actual length of the data returned to the application.
If the data exceeds the buffer length, a LENGERR condition is raised
and the data is truncated.
- SESSTOKEN(data-value)
- For CICS as an HTTP client, this option
is required. It specifies the session token, an 8-byte binary value
that uniquely identifies a connection between CICS® and
a server. This value is returned by a WEB OPEN command for CICS as
an HTTP client. Session tokens explains
the use of the session token.
- VALUE(data-area)
- specifies
the buffer to contain the value of the HTTP header being extracted.
- VALUELENGTH(data-area)
- specifies the length of the buffer
supplied on the VALUE option, as a fullword binary data area, and
is set to the actual length of the data returned to the application.
If the data exceeds the buffer length, a LENGERR condition is raised
and the data is truncated.
Conditions
- 20 ENDFILE
- The end of the list of HTTP headers
has been reached.
- 16 INVREQ
- RESP2 values are:
- 1
- The command is being issued in a non-CICS Web support application.
- 3
- The command is being issued for a non-HTTP request.
- 4
- The command is being issued before a WEB STARTBROWSE has been
issued.
- 6
- A header has been found which is not in the format NAME:VALUE.
- 22 LENGERR
- RESP2 values are:
- 1
- The length in NAMELENGTH or VALUELENGTH is less than or equal
to zero (CICS as an HTTP server).
- 4
- The header name has been truncated because the receiving buffer
is too small (CICS as an HTTP server).
- 5
- The header value has been truncated because the receiving buffer
is too small (CICS as an HTTP server).
- 35
- The length in NAMELENGTH is less than or equal to zero (CICS as
an HTTP client).
- 51
- The header name has been truncated because the receiving buffer
is too small (CICS as an HTTP client).
- 52
- The header value has been truncated because the receiving buffer
is too small (CICS as an HTTP client).
- 55
- The length in VALUELENGTH is less than or equal to zero (CICS
as an HTTP client).
- 19 NOTOPEN
- RESP2 value is:
- 27
- Invalid session token.