move http structs to new file and write struct handler functions

This commit is contained in:
Nayan
2025-05-07 18:06:14 -04:00
parent 2739b3ae95
commit 6d5f3a5c34
3 changed files with 253 additions and 17 deletions

View File

@@ -5,23 +5,6 @@
#include <string.h>
#include <sys/types.h>
struct http_request {
char* method;
char* url;
char** headers;
int num_headers;
char* body;
size_t body_length;
};
struct http_response {
char* status_line;
char** headers;
int num_headers;
char* body;
size_t body_length;
};
typedef struct http_request http_request;
typedef struct http_response http_response;