diff options
author | cflip <cflip@cflip.net> | 2023-05-08 21:25:21 -0600 |
---|---|---|
committer | cflip <cflip@cflip.net> | 2023-05-08 21:25:21 -0600 |
commit | 7f1d6bbc335288df1e24e7c8f305c32afe6b050a (patch) | |
tree | 3ca1784ab73315e44dd9e03b2f0e244a59158fbc /http.h | |
parent | 83fb0b96c94e7f596f81d5bc346150904457ed64 (diff) |
Begin rewriting cfws in C
Diffstat (limited to 'http.h')
-rw-r--r-- | http.h | 25 |
1 files changed, 25 insertions, 0 deletions
@@ -0,0 +1,25 @@ +#ifndef _H_HTTP +#define _H_HTTP + +#define CFWS_MAXURI 128 + +enum http_req_method { + HTTP_METHOD_GET +}; + +enum http_res_code { + HTTP_RESPONSE_OK = 200, + HTTP_RESPONSE_NOTFOUND = 404 +}; + +struct http_request { + int method; + char *uri; +}; + +struct http_request http_parse_request(const char *); +void http_free_request(struct http_request *); + +void http_build_response(char **, enum http_res_code, const char *); + +#endif |