rsstats 0.0.1
Redis Enterprise Statistic collector
libhttp.h File Reference

HTTP parsing and building library. More...

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Typedefs

typedef struct HTTP_s HTTP_t
 
typedef enum HTTPVersion_e HTTPVersion_t
 
typedef enum HTTPMethod_e HTTPMethod_t
 

Enumerations

enum  HTTPVersion_e {
  HTTPVERSION_HTTP09 , HTTPVERSION_HTTP10 , HTTPVERSION_HTTP11 , HTTPVERSION_HTTP11b ,
  HTTPVERSION_HTTP2 , HTTPVERSION_HTTP3 , HTTPVERSION_INVALID
}
 
enum  HTTPMethod_e {
  HTTPMETHOD_GET , HTTPMETHOD_HEAD , HTTPMETHOD_POST , HTTPMETHOD_PUT ,
  HTTPMETHOD_DELETE , HTTPMETHOD_CONNECT , HTTPMETHOD_OPTIONS , HTTPMETHOD_TRACE ,
  HTTPMETHOD_PATCH , HTTPMETHOD_INVALID
}
 

Functions

HTTP_tHTTP_new ()
 
void HTTP_addheader (HTTP_t *http, const char *name, const char *value)
 
char * HTTP_getheaders (const HTTP_t *http)
 
void HTTP_del (HTTP_t *http)
 
char * HTTP_getrequest (const HTTPMethod_t method, const char *uri, const HTTPVersion_t version)
 
void HTTP_setbody (HTTP_t *http, const char *body)
 
char * HTTP_getbody (HTTP_t *http)
 

Detailed Description

HTTP parsing and building library.

<+DETAILED+>

Author
François Cerbelle (Fanfan), franc.nosp@m.ois@.nosp@m.cerbe.nosp@m.lle..nosp@m.net

Definition in file libhttp.h.

Typedef Documentation

◆ HTTP_t

typedef struct HTTP_s HTTP_t

Definition at line 24 of file libhttp.h.

◆ HTTPMethod_t

typedef enum HTTPMethod_e HTTPMethod_t

◆ HTTPVersion_t

Enumeration Type Documentation

◆ HTTPMethod_e

Enumerator
HTTPMETHOD_GET 
HTTPMETHOD_HEAD 
HTTPMETHOD_POST 
HTTPMETHOD_PUT 
HTTPMETHOD_DELETE 
HTTPMETHOD_CONNECT 
HTTPMETHOD_OPTIONS 
HTTPMETHOD_TRACE 
HTTPMETHOD_PATCH 
HTTPMETHOD_INVALID 

Definition at line 36 of file libhttp.h.

◆ HTTPVersion_e

Enumerator
HTTPVERSION_HTTP09 
HTTPVERSION_HTTP10 
HTTPVERSION_HTTP11 
HTTPVERSION_HTTP11b 
HTTPVERSION_HTTP2 
HTTPVERSION_HTTP3 
HTTPVERSION_INVALID 

Definition at line 26 of file libhttp.h.

Function Documentation

◆ HTTP_addheader()

void HTTP_addheader ( HTTP_t http,
const char *  name,
const char *  value 
)

Definition at line 56 of file libhttp.c.

Here is the call graph for this function:

◆ HTTP_del()

void HTTP_del ( HTTP_t http)

Definition at line 114 of file libhttp.c.

Here is the call graph for this function:

◆ HTTP_getbody()

char * HTTP_getbody ( HTTP_t http)

Definition at line 206 of file libhttp.c.

◆ HTTP_getheaders()

char * HTTP_getheaders ( const HTTP_t http)

Definition at line 80 of file libhttp.c.

Here is the call graph for this function:

◆ HTTP_getrequest()

char * HTTP_getrequest ( const HTTPMethod_t  method,
const char *  uri,
const HTTPVersion_t  version 
)

Definition at line 135 of file libhttp.c.

◆ HTTP_new()

HTTP_t * HTTP_new ( )

Definition at line 37 of file libhttp.c.

Here is the call graph for this function:

◆ HTTP_setbody()

void HTTP_setbody ( HTTP_t http,
const char *  body 
)

Definition at line 191 of file libhttp.c.