Open harsath opened 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.
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
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.
We need to implement the following,
HTTPGETREsponseHandler
andHTTPPOSTResponseHandler
to check for the REST API's endpoint and callback fn. And make choices accordingly(possible solution?)HTTPMessage
building raw-message'sSetResponseType
must be determined fromSetResponseCode
, We need to avoid manually settingup the string value on downstream.