MP8 Web Server
All Data Structures Files Functions Variables Pages
libhttp.h
1 #ifndef _LIBHTTP_H_
2 #define _LIBHTTP_H_
3 
4 #include "libdictionary.h"
5 
6 typedef struct
7 {
8 
9  char * status;
10  char * body;
11  long len;
12  dictionary_t header;
13 
14 } http_t;
15 
16 
17 int http_read(http_t *http, int fd);
18 
19 const char *http_get_body(http_t *http, size_t *length);
20 const char *http_get_header(http_t *http, char *key);
21 const char *http_get_status(http_t *http);
22 
23 void http_free(http_t *http);
24 
25 
26 #endif