feat: small steps

This commit is contained in:
Jef Roosens 2023-05-26 22:41:01 +02:00
parent dfd27b579d
commit f3fced908f
Signed by: Jef Roosens
GPG key ID: B75D4F293C7052DB
4 changed files with 39 additions and 5 deletions

View file

@ -10,6 +10,8 @@
extern const char http_404[];
extern const size_t http_404_len;
extern const char http_405[];
extern const size_t http_405_len;
extern const char http_500[];
extern const size_t http_500_len;
@ -24,4 +26,12 @@ http_parse_error http_parse_request(http_request *req, const char *path,
void http_route(event_loop_conn *conn);
typedef enum http_response_type {
http_not_found = 404,
http_method_not_allowed = 405
} http_response_type;
void http_write_standard_response(event_loop_conn *conn,
http_response_type type);
#endif