track http redirection http://wubigo.com/post -> http://wubigo.com/post/ -> https://wubigo.com/post/
curl -IL http://wubigo.com/post
HTTP/1.1 301 Moved Permanently Location: https://wubigo.com/post Via: 1.1 varnish X-Cache: HIT X-Cache-Hits: 1 HTTP/1.1 200 OK Content-Length: 0 HTTP/1.1 301 Moved Permanently Strict-Transport-Security: max-age=31556952 Location: http://wubigo.com/post/ Access-Control-Allow-Origin: * X-Cache: HIT X-Cache-Hits: 1 HTTP/1.1 301 Moved Permanently Location: https://wubigo.com/post/ X-Cache: HIT X-Cache-Hits: 1 HTTP/1.1 200 OK Access-Control-Allow-Origin: * Cache-Control: max-age=600 X-Cache: HIT X-Cache-Hits: 1 main goal HTTP/2’s multiplexed connections, allowing multiple streams of data to reach all the endpoints independently.
Status-Line The first line of a Response message is the Status-Line, consisting of the protocol version followed by a numeric status code and its associated textual phrase, with each element separated by SP characters. No CR or LF is allowed except in the final CRLF sequence.
Status-Line = HTTP-Version SP Status-Code SP Reason-Phrase CRLF status code vs status in body https://www.codetinkerer.com/2015/12/04/choosing-an-http-status-code.html
The main choice is do you want to treat the HTTP status code as part of your REST API or not.
COOKIE & HTTP SESSION H5 addition that adds a key/value store to browsers and cookies
stateful session Some examples of scaling stateful sessions:
Once you run multiple backend processes on a server: A Redis daemon (on that server) for session storage. Once you run on multiple servers: A dedicated server running Redis just for session storage. Once you run on multiple servers, in multiple clusters: Sticky sessions. JWT session Stateless JWT: A JWT token that contains the session data, encoded directly into the token.