You can set up chunked transfer-coding for an HTTP request by CICS® as an HTTP client or for an HTTP response from CICS as an HTTP server.
Use this procedure to create a correctly constructed chunked message, as defined in the HTTP/1.1 specification. See The HTTP protocol for more information. If the chunked message is not correctly constructed, the recipient might discard it.
Sending an HTTP response from CICS as an HTTP server is the main set of instructions for writing an application program to send a server response. Making HTTP requests through CICS as an HTTP client is the main set of instructions for writing an application program to make a client request. You can use the instructions in the present topic with either of those sets of instructions.
You cannot form the body of a chunked message directly from CICS documents, so you cannot use the DOCTOKEN option. You must use the FROM option to specify data to form the body of a chunked message.
When you have begun sending the parts of a chunked message, you cannot send any different messages or receive any items until the final empty chunk is sent and the chunked message is complete.