1
0
Fork 0
mirror of https://github.com/warmcat/libwebsockets.git synced 2025-03-16 00:00:07 +01:00
libwebsockets/minimal-examples/http-client
Andy Green ac1229f2f7 minimal-http-client-multi: add POST
This adds support for POST in both h1 and h2 queues / stream binding.

The previous queueing tried to keep the "leader" wsi who made the
actual connection around and have it act on the transaction queue
tail if it had done its own thing.

This refactors it so instead, who is the "leader" moves down the
queue and the queued guys inherit the fd, SSL * and queue from the
old leader as they take over.

This lets them operate in their own wsi identity directly and gets
rid of all the "effective wsi" checks, which was applied incompletely
and getting out of hand considering the separate lws_mux checks for
h2 and other muxed protocols alongside it.

This change also allows one wsi at a time to own the transaction for
POST.  --post is added as an option to lws-minimal-http-client-multi
and 6 extra selftests with POST on h1/h2, pipelined or not and
staggered or not are added to the CI.
2020-02-21 17:32:41 +00:00
..
minimal-http-client cleaning 2020-01-05 22:17:58 +00:00
minimal-http-client-attach cleaning 2020-01-05 22:17:58 +00:00
minimal-http-client-certinfo cleaning 2020-01-05 22:17:58 +00:00
minimal-http-client-custom-headers cleaning 2020-01-05 22:17:58 +00:00
minimal-http-client-h2-rxflow cleaning 2020-01-05 22:17:58 +00:00
minimal-http-client-hugeurl cleaning 2020-01-05 22:17:58 +00:00
minimal-http-client-multi minimal-http-client-multi: add POST 2020-02-21 17:32:41 +00:00
minimal-http-client-post cleaning 2020-01-05 22:17:58 +00:00
README.md minimal-http-client-custom-headers 2019-03-12 11:57:43 +08:00

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