rsstats 0.0.1
Redis Enterprise Statistic collector
libhttp.c File Reference

HTTP parsing and building library. More...

#include "libhttp.h"
#include "sclist.h"
#include "base64.h"
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include <assert.h>
Include dependency graph for libhttp.c:

Go to the source code of this file.

Classes

struct  HTTP_s
 
struct  HTTPHeader_s
 

Typedefs

typedef struct HTTP_s HTTP_t
 
typedef struct HTTPHeader_s HTTPHeader_t
 

Functions

HTTPHeader_tHTTPHeader_new (const char *name, const char *value)
 
void HTTPHeader_del (HTTPHeader_t *header)
 
HTTPHeader_tHTTPHeader_basicauth (const char *login, const char *pass)
 
char * HTTPHeader_getname (HTTPHeader_t *header)
 
char * HTTPHeader_getvalue (HTTPHeader_t *header)
 
HTTP_tHTTP_new ()
 
void HTTP_del (HTTP_t *http)
 
char * HTTP_setbody (HTTP_t *http, const char *body)
 
char * HTTP_getbody (HTTP_t *http)
 
void HTTP_addheader (HTTP_t *http, const char *name, const char *value)
 
char * HTTP_getheaders (const HTTP_t *http)
 
char * HTTP_getrequest (const HTTPMethod_t method, const char *uri, const HTTPVersion_t version)
 

Detailed Description

HTTP parsing and building library.

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

Definition in file libhttp.c.

Typedef Documentation

◆ HTTP_t

typedef struct HTTP_s HTTP_t

◆ HTTPHeader_t

typedef struct HTTPHeader_s HTTPHeader_t

Function Documentation

◆ HTTP_addheader()

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

Definition at line 190 of file libhttp.c.

Here is the call graph for this function:

◆ HTTP_del()

void HTTP_del ( HTTP_t http)

Definition at line 136 of file libhttp.c.

Here is the call graph for this function:

◆ HTTP_getbody()

char * HTTP_getbody ( HTTP_t http)

Definition at line 176 of file libhttp.c.

◆ HTTP_getheaders()

char * HTTP_getheaders ( const HTTP_t http)

Definition at line 214 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 248 of file libhttp.c.

◆ HTTP_new()

HTTP_t * HTTP_new ( )

Definition at line 111 of file libhttp.c.

Here is the call graph for this function:

◆ HTTP_setbody()

char * HTTP_setbody ( HTTP_t http,
const char *  body 
)

Definition at line 159 of file libhttp.c.

◆ HTTPHeader_basicauth()

HTTPHeader_t * HTTPHeader_basicauth ( const char *  login,
const char *  pass 
)

Definition at line 72 of file libhttp.c.

Here is the call graph for this function:

◆ HTTPHeader_del()

void HTTPHeader_del ( HTTPHeader_t header)

Definition at line 62 of file libhttp.c.

◆ HTTPHeader_getname()

char * HTTPHeader_getname ( HTTPHeader_t header)

Definition at line 101 of file libhttp.c.

◆ HTTPHeader_getvalue()

char * HTTPHeader_getvalue ( HTTPHeader_t header)

Definition at line 106 of file libhttp.c.

◆ HTTPHeader_new()

HTTPHeader_t * HTTPHeader_new ( const char *  name,
const char *  value 
)

Definition at line 38 of file libhttp.c.

Here is the caller graph for this function: