mirror of
https://github.com/opus-tango/http-server-in-c.git
synced 2026-03-20 03:55:25 +00:00
implement basic response builder
This commit is contained in:
@@ -7,8 +7,27 @@
|
||||
|
||||
#include "http_stuff.h"
|
||||
|
||||
typedef enum {
|
||||
HTML,
|
||||
CSS,
|
||||
JS,
|
||||
PNG,
|
||||
JPG,
|
||||
} content_type;
|
||||
|
||||
typedef enum {
|
||||
OK,
|
||||
NOT_FOUND,
|
||||
BAD_REQUEST,
|
||||
INTERNAL_SERVER_ERROR,
|
||||
} status_code;
|
||||
|
||||
void response_handle_get(http_request* req, http_response* res);
|
||||
|
||||
char* response_to_string(http_response* res);
|
||||
|
||||
void serve_static_file(http_request* req, http_response* res);
|
||||
void response_build_static_file(http_request* req, http_response* res);
|
||||
|
||||
void serve_404(http_request* req, http_response* res);
|
||||
|
||||
#endif
|
||||
Reference in New Issue
Block a user