Home --> Documentations --> PJLIB-UTIL Reference

pj_http_req_param Struct Reference

Data Structures

struct  pj_http_reqdata

Data Fields

int addr_family
pj_str_t method
pj_str_t version
pj_time_val timeout
void * user_data
pj_http_headers headers
struct pj_http_req_param::pj_http_reqdata reqdata
pj_http_auth_cred auth_cred
pj_uint16_t source_port_range_start
pj_uint16_t source_port_range_size
pj_uint16_t max_retries

Detailed Description

Parameters that can be given during http request creation. Application must initialize this structure with pj_http_req_param_default().

Field Documentation

◆ addr_family

int pj_http_req_param::addr_family

The address family of the URL. Default is pj_AF_INET().

◆ auth_cred

pj_http_auth_cred pj_http_req_param::auth_cred

Authentication credential needed to respond to 401/407 response.

◆ headers

pj_http_headers pj_http_req_param::headers

HTTP request headers. Default is empty.

◆ max_retries

pj_uint16_t pj_http_req_param::max_retries

Max number of retries if binding to a port fails. Note that this does not adress the scenario where a request times out or errors. This needs to be taken care of by the on_complete callback.

Default is 3

◆ method

pj_str_t pj_http_req_param::method

The HTTP request method. Default is GET.

◆ source_port_range_size

pj_uint16_t pj_http_req_param::source_port_range_size

Optional source port range to use when binding. The size of the port restriction range

Default is 0 (The OS will select the source port automatically))

◆ source_port_range_start

pj_uint16_t pj_http_req_param::source_port_range_start

Optional source port range to use when binding the socket. This can be used if the source port needs to be within a certain range for instance due to strict firewall settings. The port used will be randomized within the range.

Note that if authentication is configured, the authentication response will be a new transaction

Default is 0 (The OS will select the source port automatically)

◆ timeout

pj_time_val pj_http_req_param::timeout

HTTP request operation timeout. Default is PJ_HTTP_DEFAULT_TIMEOUT.

◆ user_data

void* pj_http_req_param::user_data

User-defined data. Default is NULL.

◆ version

pj_str_t pj_http_req_param::version

The HTTP protocol version ("1.0" or "1.1"). Default is "1.0".

The documentation for this struct was generated from the following file:


PJLIB-UTIL Open Source, small footprint, and portable asynchronous/caching DNS resolver, text scanner, STUN client, and XML library
Copyright (C) 2006-2009 Teluu Inc.