The exit-http-resp-headers user exit provides access to any and all HTTP headers present in the response message from a Web service.
Signature of Web Service HTTP response headers user exit function
C terminology:
Function_Name(void * headerArrayPtr, int headerCount)
COBOL terminology:
LINKAGE SECTION. 01 headerArrayPtr pointer. 01 headerCount pic 9(9) usage comp-5. 01 header. 03 namePtr pointer. 03 valuePtr pointer. 01 headerName pic x(1). 01 headerValue pic x(1). PROCEDURE DIVISION. EXIT PROGRAM. … ENTRY "exit-http-resp-headers" using By value headerArrayPtr, headerCount. set address of header to headerArrayPtr perform headerCount times set address of headerName to namePtr of header set address of headerValue to valuePtr of header perform varying headerNameLen from 1 by 1 until headerName(headerNameLen:1) = low-value end-perform subtract 1 from headerNameLen perform varying headerValueLen from 1 by 1 until headerValue(headerValueLen:1) = low-value end-perform . … EXIT PROGRAM.
The variables:
The variables use I/O terminology: