The name of the URL for the proxy request and the body of the request are
in the default CCSID of the job.
void
HTTPD_LINKAGE
HTTPD_proxy(
unsigned char *handle, /* i; handle (NULL right now) */
unsigned char *url_name, /* i; url for the proxy request */
unsigned long *name_length, /* i; length of the url */
unsigned char *request_body, /* i; body of the request */
unsigned long *body_length, /* i; length of the body */
long *return_code); /* o; return code */
Note: Once an HTTPD_ function returns, it is safe for you to free any memory you
passed with it.
Return codes
The server fills in the return code parameter with one of these values depending
on the success of the request.
-1 HTTPD_UNSUPPORTED
The function is not supported.
0HTTPD_SUCCESS
The function succeeded, and the output fields are valid.
1HTTPD_FAILURE
The function failed.
2HTTPD_INTERNAL_ERROR
The function encountered an internal error and cannot continue processing
this request.
3HTTPD_PARAMETER_ERROR
You may have added one or more incorrect parameters. For example, the
variable you tried to extract is unknown.
4HTTPD_STATE_CHECK
The function is not valid in this step.
5HTTPD_READ_ONLY
Returned only by HTTP_set(). The application can not set the variable.
6HTTPD_BUFFER_TOO_SMALL
Returned only by HTTPD_extract(). The provided buffer was too small.
7HTTPD_AUTHENTICATION_FAILED
Returned only by HTTPD_authenticate(). Examine the HTTP_RESPONSE
and HTTP_REASON variables for more information.
8HTTPD_EOF
Returned only by HTTPD_read(). This return code indicates the end of the
request body.
9HTTPD_ABORT_REQUEST
The request has been aborted because the client has provided an entity that
did not match the condition that is specified by the request.
Chapter7. Writing Server API programs 119