LibHTTP API Reference

December 16, 2016 ยท View on GitHub

struct httplib_request_info;

Fields

FieldTypeDescription
request_methodconst char *The request method used by the client for the connection this can be GET, POST or one of the other common HTTP request methods
request_uriconst char *The absolute or URL-encoded URI as it was sent in the request
local_uriconst char *The relative URL-encoded URI as it references the local resource. If the request URI does not reference a resource on the local server, this field is NULL
uriconst char *Deprecated. Use local_uri instead
http_versionconst char *The HTTP version as mentioned in the client request. This can be "1.0", "1.1", etc.
remote_userconst char *The name of the authenticated remote user, or NULL if no authentication was used
remote addrchar[48]The IP address of the remote client as a string. This can either represent an IPv4 or an IPv6 address.
remote_iplongDeprecated. Use remote_addr instead
content_lengthint64_tThe content length of the request body. This value can be -1 if no content length was provided.
remote_portintThe port number at the client's side
is_sslint1 if the connection is over SSL, and 0 if it is a plain connection
user_datavoid *A pointer to the user_data information which was provided as a parameter to httplib_start().
conn_datavoid *A pointer to connection specific user data
num_headersintThe number of HTTP request headers sent by the client
http_headersstruct httplib_header[64]Array of structures with the HTTP request headers sent by the client
client_certstruct client_cert *Pointer to the client certificate information, when available

Description

The httplib_request_info structure contains the client information of an existing connection.

See Also