harsath / Asynchronous-HTTP-Framework-CPP

Asynchronous/event-driven HTTP Application Web Server & REST API Framework Implementation in C++
MIT License
1 stars 0 forks source link

Add more core support(s) #26

Open harsath opened 3 years ago

harsath commented 3 years ago

We need to implement the following,

harsath commented 3 years ago

For point 2, (REST-APIs resource GET), I think this is an application's business logic and we as a server DO NOT need to worry about this. We will parse the HTTP-Message and pass it to the corresponding call-back handler, and it is the handler's responsibility to take care of this business logic. But I think, we can support the HTTP Basic Auth for such endpoints.

Draft: Let the user pass the file containing the username/password for the HTTP Basic Auth and we just dobase64 decode and check against those files. If it gets a hit, we will send the parsed HTTP-Message object to the call-back handler if not, we will send an HTTP Not Authorized.

harsath commented 3 years ago

We need to create a few template responses HTTP::HTTPMessage for a common types of responses like error code, Auth-fail, and such. Since the actual implementation code and client's examples get longer for no reason, we need to find some way to abstract out those templates.

EDIT: Done

harsath commented 3 years ago

Support for UNIX domain listener. Why? Because we can have web servers like NGINX as a frontend server/reverse proxy to our C++ runtime which processes the HTTP Messages from that UNIX domain sock's endpoint and write the processed response to the NGINX's socket. Make NGINX do certain heavy lifting like SSL, Timeouts and we just focus on the business logic.