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" in the CICS Internet Guide 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
- ENDFILE
- The
end of the list of HTTP headers has been reached.
- 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.
- LENGERR
- RESP2
values are:
- 1
- NAMELENGTH or VALUELENGTH is less than or equal to zero.
- 4
- The header name has been truncated during a browse operation because the
receiving buffer is too small.
- 5
- The header value has been truncated because the receiving buffer is too
small.
NOTOPEN
RESP2
value is: - 27
- Invalid session token.
