Tilde Friends
_tf_http_request_t Struct Reference

#include <http.h>

Public Attributes

tf_http_thttp
 
tf_http_connection_tconnection
 
bool is_tls
 
const char * method
 
const char * path
 
const char * query
 
void * body
 
size_t content_length
 
struct phr_header * headers
 
int headers_count
 
tf_http_message_callbackon_message
 
tf_http_close_callbackon_close
 
void * context
 
void * user_data
 
int ref_count
 

Detailed Description

An HTTP request.

Member Data Documentation

◆ body

void* _tf_http_request_t::body

The HTTP request body.

◆ connection

tf_http_connection_t* _tf_http_request_t::connection

The HTTP connection associated with this request.

◆ content_length

size_t _tf_http_request_t::content_length

The length of the HTTP request body.

◆ context

void* _tf_http_request_t::context

Extra storage for user data.

◆ headers

struct phr_header* _tf_http_request_t::headers

Header storage. Can also be accessed with tf_http_request_get_header().

◆ headers_count

int _tf_http_request_t::headers_count

The number of headers stored.

◆ http

tf_http_t* _tf_http_request_t::http

The HTTP instance this request belongs to.

◆ is_tls

bool _tf_http_request_t::is_tls

True if this is an HTTPS session.

◆ method

const char* _tf_http_request_t::method

The HTTP method of the request (GET/POST/...).

◆ on_close

tf_http_close_callback* _tf_http_request_t::on_close

A callback to be called when the connection is closed.

◆ on_message

tf_http_message_callback* _tf_http_request_t::on_message

A callback to be called when receiving a websocket message.

◆ path

const char* _tf_http_request_t::path

The HTTP request path.

◆ query

const char* _tf_http_request_t::query

The raw HTTP query string.

◆ ref_count

int _tf_http_request_t::ref_count

The number of times tf_http_request_ref() has been called without tf_http_request_unref().

◆ user_data

void* _tf_http_request_t::user_data

User data available to callbacks.


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