mirror of
https://github.com/warmcat/libwebsockets.git
synced 2025-03-16 00:00:07 +01:00
![]() This teaches http client stuff how to handle 303 redirects... these can happen after POST where the server side wants you to come back with a GET to the Location: mentioned. lws client will follow the redirect and force GET, this works for both h1 and h2. Client protocol handler has to act differently if it finds it is connecting for the initial POST or the subsequent GET, it can find out which by checking a new api lws_http_is_redirected_to_get(wsi) which returns nonzero if in GET mode. Minimal example for server form-post has a new --303 switch to enable this behaviour there and the client post example has additions to check lws_http_is_redirected_to_get(). |
||
---|---|---|
.. | ||
minimal-http-client | ||
minimal-http-client-certinfo | ||
minimal-http-client-custom-headers | ||
minimal-http-client-hugeurl | ||
minimal-http-client-multi | ||
minimal-http-client-post | ||
README.md |
name | demonstrates |
---|---|
minimal-http-client-certinfo | Shows how to gain detailed information on the peer certificate |
minimal-http-client-custom-headers | Shows how to send and receive custom headers (h1 only) |
minimal-http-client-hugeurl | Sends a > 2.5KB URL to warmcat.com |
minimal-http-client-multi | Connects to and reads https://warmcat.com, 8 times concurrently |
minimal-http-client-post | POSTs a form containing an uploaded file and a form variable, and captures the response |
minimal-http-client | Connects to and reads https://warmcat.com |