Jaysmito101 / cgl

CGL (C Game Library) is a multipurpose library mainly for recreational coding / demo scenes / prototyping / small games / experimentation.
https://jaysmito101.github.io/cgl/
MIT License
395 stars 36 forks source link

Feature Request: Add HTTP Request/Response Parser #21

Open Jaysmito101 opened 1 year ago

Jaysmito101 commented 1 year ago

CGL has a basic http request function but the way it parses the requests received is very basic. It needs a proper parser for HTTP requests to parse it into its own data structure.

Relevant CGL functions:

int CGL_net_http_request(const char* method, const char* host, const char* path, void* 
response_buffer, size_t* size, const char* accept, const char* user_agent, const char* body);
int CGL_net_http_get(const char* host, const char* path, void* buffer, size_t* size, const char* accept, const char* user_agent);
int CGL_net_http_post(const char* host, const char* path, void* buffer, size_t* size, const char* accept, const char* user_agent, const char* body);