http_request_add_header
Name
http_request_add_header — Add a header to an HTTP request
Synopsis
#include "modules/delivery/http/httpclnt.h"
| int **http_request_add_header** ( | sess, | |
| | header, | |
| | value, | |
| | replace); | |
http_session *<var class="pdparam">sess</var>;
const char *<var class="pdparam">header</var>;
const char *<var class="pdparam">value</var>;
int <var class="pdparam">replace</var>;
Description
**Configuration Change. ** This function is available as of version 3.6.
Add a header to an HTTP request. You must call http_request_finalize after invoking this function.
- sess
-
The http_session. For a description of this data type see “http_session”.
- header
-
A character pointer to the header.
- value
-
A character pointer to the value associated with the header.
- replace
-
Whether or not you are adding a new header or replacing an existing header.
On successful replacement of an existing header, this function returns 1. Upon successfully appending a new header, this function returns 0.
It is legal to call this function in any thread.