graemegilmourbates / webpp

Web backend server framework written in c++
2 stars 0 forks source link

Create/Handle response type #2

Open graemegilmourbates opened 1 year ago

graemegilmourbates commented 1 year ago

When returning a response from the server, a response type(HTML, JSON etc...) must be defined. Possibly create more "responder" functions like send_html(std::string my_html) or send_json(etc..) Or tag response type in the add_route function(this seems a bit sillier) Third option which could make the project cleaner is to create a response class and derive from it the different response types.

graemegilmourbates commented 1 year ago

File transfer response now works, so far just jpeg and ico images are supported but file transfer function is abstract enough to handle and file, use must just provide the http content type

graemegilmourbates commented 1 year ago

Want to handle file/form uploads, but probably after I get the http request parser ready....