/[osn-commons]/trunk/freehttpd/request.h
ViewVC logotype

Contents of /trunk/freehttpd/request.h

Parent Directory Parent Directory | Revision Log Revision Log


Revision 44 - (show annotations)
Sat Aug 10 18:33:37 2024 UTC (7 months, 2 weeks ago) by rakinar2
File MIME type: text/x-c
File size: 905 byte(s)
feat: add freehttpd source files to the project

1 #ifndef FREEHTTPD_REQUEST_H
2 #define FREEHTTPD_REQUEST_H
3
4 #include "freehttpd.h"
5 #include <stdbool.h>
6 #include <stddef.h>
7
8 typedef struct freehttpd_header
9 {
10 char *name;
11 char *value;
12 } freehttpd_header_t;
13
14 typedef struct freehttpd_request
15 {
16 char *method;
17 size_t method_length;
18 char *uri;
19 size_t uri_length;
20 char *version;
21 size_t version_length;
22 freehttpd_header_t **headers;
23 size_t headers_count;
24 char *body;
25 size_t body_length;
26 } freehttpd_request_t;
27
28 freehttpd_request_t *freehttpd_request_init (const char *method,
29 const char *uri,
30 const char *version);
31 void freehttpd_request_free (freehttpd_request_t *request);
32 freehttpd_request_t *freehttpd_request_parse (freehttpd_t *freehttpd,
33 int sockfd, ecode_t *error);
34
35 #endif

team@onesoftnet.eu.org
ViewVC Help
Powered by ViewVC 1.1.26