2023-02-09 12:50:26 +00:00
|
|
|
#ifndef HTTP_H
|
|
|
|
#define HTTP_H
|
|
|
|
|
|
|
|
#include <stdlib.h>
|
|
|
|
|
|
|
|
typedef enum {
|
|
|
|
HttpMethodGet,
|
|
|
|
HttpMethodPost,
|
|
|
|
} HttpMethod;
|
|
|
|
|
|
|
|
typedef struct {
|
|
|
|
HttpMethod method;
|
|
|
|
size_t path_index, path_length;
|
|
|
|
size_t content_length;
|
2023-02-09 22:02:54 +00:00
|
|
|
size_t body_index;
|
2023-02-09 12:50:26 +00:00
|
|
|
} HttpRequestHeader;
|
|
|
|
|
|
|
|
HttpRequestHeader parse_http_request_header(const char* message, size_t message_size);
|
|
|
|
|
|
|
|
#endif
|