File: http.h

package info (click to toggle)
didiwiki 0.5-13
  • links: PTS
  • area: main
  • in suites: bullseye, buster, sid, stretch
  • size: 968 kB
  • ctags: 508
  • sloc: ansic: 1,849; sh: 921; makefile: 18
file content (64 lines) | stat: -rw-r--r-- 1,234 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
#ifndef _HAVE_HTTP_HEADER
#define _HAVE_HTTP_HEADER

typedef struct HttpResponse     HttpResponse;
typedef struct HttpRequest      HttpRequest;
typedef struct HttpRequestParam HttpRequestParam;

HttpRequest*
http_server(struct in_addr address, int iPort);

HttpRequest*
http_request_new(void);

char*
http_request_param_get(HttpRequest *req, char *key);

char*
http_request_get_uri(HttpRequest *req);

char*
http_request_get_path_info(HttpRequest *req);

char*
http_request_get_query_string(HttpRequest *req);

char*
http_request_get_ip_src(HttpRequest *req);

HttpResponse*
http_response_new(HttpRequest *req);

void
http_response_printf(HttpResponse *res, const char *format, ...);

void
http_response_printf_alloc_buffer(HttpResponse *res, int bytes);

void
http_response_set_content_type(HttpResponse *res, char *type);

void
http_response_set_status(HttpResponse *res,
			 int           status_code,
			 char         *status_desc) ;

void
http_response_set_data(HttpResponse *res, void *data, int data_len);

void
http_response_append_header(HttpResponse *res, char *header);

void
http_response_send_headers(HttpResponse *res);

void
http_response_send(HttpResponse *res);

void
sigint(int sig);

void
sigterm(int sig);

#endif