refactor(http): change cws_http_s to cws_request_s
This commit is contained in:
@@ -2,7 +2,7 @@
|
||||
#define CWS_SERVER_H
|
||||
|
||||
#include <myclib/myhashmap.h>
|
||||
#include <myclib/mysocket.h>
|
||||
#include <netdb.h>
|
||||
#include <signal.h>
|
||||
|
||||
#include "config/config.h"
|
||||
|
||||
@@ -24,17 +24,17 @@ typedef enum cws_http_status {
|
||||
HTTP_NOT_IMPLEMENTED,
|
||||
} cws_http_status_e;
|
||||
|
||||
typedef struct cws_http {
|
||||
typedef struct cws_request {
|
||||
int sockfd;
|
||||
cws_http_method_e method;
|
||||
string_s *location;
|
||||
string_s *location_path;
|
||||
string_s *http_version;
|
||||
hashmap_s *headers;
|
||||
} cws_http_s;
|
||||
} cws_request_s;
|
||||
|
||||
cws_http_s *cws_http_parse(string_s *request_str);
|
||||
cws_request_s *cws_http_parse(string_s *request_str);
|
||||
|
||||
void cws_http_free(cws_http_s *request);
|
||||
void cws_http_free(cws_request_s *request);
|
||||
|
||||
#endif
|
||||
|
||||
@@ -9,6 +9,6 @@ size_t http_simple_html(char **response, cws_http_status_e status, char *title,
|
||||
size_t http_response_builder(char **response, cws_http_status_e status, char *content_type,
|
||||
char *body, size_t body_len_bytes);
|
||||
|
||||
void cws_http_send_response(cws_http_s *request, cws_http_status_e status);
|
||||
void cws_http_send_response(cws_request_s *request, cws_http_status_e status);
|
||||
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user