java -jar start.jar --add-to-startd=http,https,deploy
java -jar $JETTY_HOME/start.jar --add-to-startd=http2
java -jar $JETTY_HOME/start.jar
main: Started ServerConnector@4590c9c3{HTTP/1.1,[http/1.1]}{0.0.0.0:8080}
Started ServerConnector@2fd66ad3{SSL,[ssl, alpn, h2, h2-17, h2-16, h2-15, h2-14, http/1.1]}{0.0.0.0:8443}
java -jar $JETTY_HOME/start.jar --add-to-startd=http2c
put is like a file upload. It only affects that URI. eg put an item, will create an item if it dosent exists or update an item if it exists. If same request is made again it will only affect that item and it will create no change on the server(idempotent).
post can have any effect on server. eg we post an item and it may cause other changes to another uri like user. Posting an item may change the state of the user and other URI on server or cause some processing which changes different URI (resource). POST is not idempotent since we cannot know the state of the server. Multiple post request may produce different results
http1 we could not create multiple connections per domain
hence we started using domain sharding
like all images served from ebay.img domain.. all css from ebay.css
this enabled browsers to create multiple connections since thay are different domains
with http1.1 pipelining was introduced
this enabled browsers to pipeline calls like.. lets say we want 10 css files
we can file multiple calls and then they are like fire and forget
they are then collected back in a sequence
if one call is slow then all the subsequent calls in pipeline become slow
also pipelining is not supported by all servers and is difficult to deploy on servers
with http2 we have multiplexing
now a bidirectional connection is kept open forever (of course it will have some timeout for inatctivity)
and if we need 10 css files ..they can be requested in parallel. ,ultiple request and response can be in flight at same time.
this has enabled one connection only per origin with request ao multiple resources