Skip to main content

Name

http_request_finalize — Finalize changes to an HTTP request

Synopsis

#include "modules/delivery/http/httpclnt.h"

| **http_request_finalize** ( | sess, |   | |   | update); |   |

http_session *<var class="pdparam">sess</var>; int <var class="pdparam">update</var>;

Description

**Configuration Change. ** This function is available as of version 3.6.

Finalize changes to an HTTP request. Call this function whenever the structural data in an http_request has been modified.

Parameters

sess

The http_session. For a description of this data type see “http_session”.

update

If update is set to 0 and the request is present, the routine does nothing and returns the length of the existing request. If update is set to 0 and the request is not present then the routine builds the HTTP request. If update is set to 1, the existing request is deleted and a new HTTP request is built.

Return Values

When update is set to 1, this function returns HTTP_INTERNAL_OK on success. On failure, HTTP_INTERNAL_FAIL is returned.

When update is set to 0, and the request is present, this function returns the length of the request data field.

Threading

It is legal to call this function in any thread.

See Also

Was this page helpful?