William Lallemand
33b0d095cc
MINOR: httpclient: implement a simple HTTP Client API
...
This commit implements a very simple HTTP Client API.
A client can be operated by several functions:
- httpclient_new(), httpclient_destroy(): create
and destroy the struct httpclient instance.
- httpclient_req_gen(): generate a complete HTX request using the
the absolute URL, the method and a list of headers. This request
is complete and sets the HTX End of Message flag. This is limited
to small request we don't need a body.
- httpclient_start() fill a sockaddr storage with a IP extracted
from the URL (it cannot resolve an fqdm for now), start the
applet. It also stores the ptr of the caller which could be an
appctx or something else.
- hc->ops contains a list of callbacks used by the
HTTPClient, they should be filled manually after an
httpclient_new():
* res_stline(): the client received a start line, its content
will be stored in hc->res.vsn, hc->res.status, hc->res.reason
* res_headers(): the client received headers, they are stored in
hc->res.hdrs.
* res_payload(): the client received some payload data, they are
stored in the hc->res.buf buffer and could be extracted with the
httpclient_res_xfer() function, which takes a destination buffer
as a parameter
* res_end(): this callback is called once we finished to receive
the response.
2021-08-18 17:36:32 +02:00
..
2020-11-05 19:27:09 +01:00
2021-03-26 15:28:33 +01:00
2021-07-06 07:24:42 +02:00
2021-05-07 14:35:01 +02:00
2021-08-04 16:03:36 +02:00
2021-01-29 12:10:33 +01:00
2020-06-11 10:18:59 +02:00
2021-03-26 15:28:33 +01:00
2021-08-18 17:36:32 +02:00
2021-07-13 18:20:34 +02:00
2020-12-16 15:49:53 +01:00
2021-07-16 19:18:41 +02:00
2021-08-01 17:34:06 +02:00
2020-07-05 21:32:47 +02:00
2020-06-11 10:18:59 +02:00
2021-06-22 18:43:12 +02:00
2020-10-09 11:27:30 +02:00
2021-04-13 17:28:13 +02:00
2020-06-11 10:18:59 +02:00
2021-05-25 10:41:50 +02:00
2021-04-07 18:18:37 +02:00
2020-06-11 10:18:57 +02:00
2020-06-11 10:18:57 +02:00
2021-07-16 19:18:41 +02:00
2021-07-20 18:03:08 +02:00
2021-04-01 18:03:37 +02:00
2021-07-16 19:18:41 +02:00
2021-06-20 11:46:26 +02:00
2021-08-12 00:51:59 +02:00
2021-08-06 11:09:48 +02:00
2021-08-06 11:09:48 +02:00
2021-04-08 20:11:58 +02:00
2021-05-09 22:39:07 +02:00
2021-05-08 12:34:44 +02:00
2021-07-21 10:22:48 +02:00
2021-04-30 17:16:36 +02:00
2021-04-22 16:08:25 +02:00
2020-06-11 10:18:57 +02:00
2021-07-29 15:40:45 +02:00
2021-07-30 08:34:38 +02:00
2021-02-01 15:16:33 +01:00
2021-06-15 16:52:42 +02:00
2021-04-27 14:11:26 +02:00
2021-01-22 14:48:34 +01:00
2021-07-20 18:03:08 +02:00
2020-06-11 10:18:59 +02:00
2020-06-11 10:18:59 +02:00
2020-06-11 10:18:59 +02:00
2020-12-31 10:04:54 +01:00
2021-02-13 10:03:46 +01:00
2021-05-09 06:50:46 +02:00
2021-02-20 12:38:18 +01:00
2021-03-22 20:54:15 +01:00
2021-07-06 07:24:42 +02:00
2021-03-05 08:30:08 +01:00
2020-06-11 10:18:59 +02:00
2020-06-11 10:18:58 +02:00
2020-06-11 10:18:57 +02:00
2021-08-04 16:03:36 +02:00
2021-08-04 16:03:36 +02:00
2021-05-09 06:50:46 +02:00
2020-11-24 14:17:32 +01:00
2021-03-10 10:44:20 +01:00
2021-03-10 10:44:20 +01:00
2020-06-11 10:18:58 +02:00
2021-04-11 11:11:27 +02:00
2021-08-01 17:34:06 +02:00
2020-06-11 10:18:58 +02:00
2021-08-09 17:51:55 +02:00
2021-06-15 16:52:42 +02:00
2021-07-08 17:11:17 +02:00
2021-01-28 16:37:14 +01:00
2021-02-08 10:49:08 +01:00
2020-06-11 10:18:56 +02:00
2020-06-11 10:18:57 +02:00
2021-08-12 08:57:07 +02:00
2021-08-12 08:57:07 +02:00
2020-06-11 10:18:57 +02:00
2020-06-11 10:18:57 +02:00
2020-06-11 10:18:57 +02:00
2020-12-22 10:18:07 +01:00
2020-06-11 10:18:58 +02:00
2021-01-28 16:27:48 +01:00
2021-04-01 16:27:40 +02:00
2021-08-18 17:36:32 +02:00
2021-08-18 17:36:32 +02:00
2020-06-11 10:18:59 +02:00
2020-06-11 10:18:59 +02:00
2021-07-07 15:34:01 +02:00
2021-04-21 09:20:17 +02:00
2020-06-11 10:18:57 +02:00
2020-06-11 10:18:57 +02:00
2021-07-08 17:11:17 +02:00
2021-08-17 10:16:22 +02:00
2021-04-28 10:51:08 +02:00
2021-06-11 14:05:34 +02:00
2021-03-26 15:28:33 +01:00
2021-03-26 15:28:33 +01:00
2021-04-10 19:27:41 +02:00
2021-02-09 17:52:50 +01:00
2020-06-11 10:18:56 +02:00
2020-06-11 10:18:59 +02:00
2021-05-31 10:55:51 +02:00
2020-06-11 10:18:58 +02:00
2020-06-11 10:18:58 +02:00
2020-06-11 10:18:58 +02:00
2020-06-11 10:18:58 +02:00
2020-06-11 10:18:58 +02:00
2020-06-11 10:18:58 +02:00
2020-06-11 10:18:59 +02:00
2020-06-11 10:18:58 +02:00
2020-06-11 10:18:56 +02:00
2021-04-21 09:20:17 +02:00
2021-05-17 10:50:24 +02:00
2021-04-21 09:20:17 +02:00
2021-04-07 09:18:34 +02:00
2021-07-29 15:40:45 +02:00
2020-06-11 10:18:59 +02:00
2020-06-11 10:18:58 +02:00
2020-06-11 10:18:58 +02:00
2020-06-11 10:18:58 +02:00
2020-11-05 19:27:03 +01:00
2020-11-05 19:27:03 +01:00
2021-06-15 16:52:42 +02:00
2021-05-31 10:51:06 +02:00
2020-06-11 10:18:59 +02:00
2020-06-11 10:18:59 +02:00
2020-06-11 10:18:57 +02:00
2020-06-11 10:18:57 +02:00
2021-02-13 09:43:18 +01:00
2021-06-14 15:12:53 +02:00
2021-05-25 08:44:45 +02:00
2021-05-25 08:44:48 +02:00
2020-06-11 10:18:58 +02:00
2021-07-06 07:24:42 +02:00
2021-05-31 10:50:46 +02:00
2020-06-11 10:18:57 +02:00
2020-06-11 10:18:57 +02:00
2020-06-11 10:18:56 +02:00
2021-06-10 17:46:50 +02:00
2021-06-10 17:46:50 +02:00
2020-09-12 20:56:41 +02:00
2021-05-31 10:50:32 +02:00
2020-12-23 11:57:26 +01:00
2020-12-08 14:54:08 +01:00
2020-12-08 14:54:08 +01:00
2020-12-08 18:10:18 +01:00
2020-12-08 14:54:08 +01:00
2020-06-11 10:18:58 +02:00
2021-01-04 10:09:02 +01:00
2020-12-11 17:02:50 +01:00
2021-06-11 16:57:34 +02:00
2021-08-03 14:17:45 +02:00
2021-04-07 18:18:37 +02:00
2021-01-04 12:31:28 +01:00
2021-06-24 10:52:31 +02:00
2021-06-24 10:52:31 +02:00
2021-01-06 16:26:50 +01:00
2020-12-23 11:57:26 +01:00
2021-01-04 12:31:28 +01:00
2020-12-23 11:57:26 +01:00
2020-12-23 11:57:26 +01:00
2020-12-23 11:57:26 +01:00
2020-12-23 11:57:26 +01:00
2020-12-23 11:57:26 +01:00
2021-03-02 10:34:18 +01:00
2021-06-15 16:52:42 +02:00
2020-08-14 07:53:40 +02:00
2020-08-14 07:53:40 +02:00
2021-06-11 16:16:16 +02:00
2021-06-11 16:16:16 +02:00
2020-06-11 10:18:59 +02:00
2021-02-13 09:43:17 +01:00
2020-06-11 10:18:59 +02:00
2021-03-26 16:34:53 +01:00
2021-03-26 16:23:45 +01:00
2021-08-06 11:09:48 +02:00
2021-07-16 10:08:55 +02:00
2020-12-04 14:41:48 +01:00
2021-07-06 07:24:42 +02:00
2021-06-15 16:52:42 +02:00
2021-06-15 16:52:42 +02:00
2020-06-11 10:18:59 +02:00
2020-06-11 10:18:58 +02:00
2020-10-19 14:08:13 +02:00
2021-04-07 18:18:37 +02:00
2020-12-04 15:08:00 +01:00
2020-10-15 21:47:56 +02:00
2020-08-28 19:26:39 +02:00
2020-12-11 17:02:50 +01:00
2021-08-05 10:07:43 +02:00
2020-06-11 10:18:58 +02:00
2021-05-17 10:50:24 +02:00
2021-05-17 10:50:24 +02:00
2020-06-11 10:18:59 +02:00
2021-03-23 19:29:46 +01:00
2021-07-29 15:40:45 +02:00
2021-06-18 16:42:25 +02:00
2020-06-11 10:18:57 +02:00
2021-05-08 10:52:12 +02:00
2021-05-08 10:52:12 +02:00
2021-07-06 07:24:42 +02:00
2021-07-06 07:24:42 +02:00
2020-06-11 10:18:58 +02:00
2021-03-05 08:30:08 +01:00
2021-06-17 17:58:50 +02:00
2021-07-06 07:24:42 +02:00
2021-03-13 11:30:19 +01:00
2021-08-06 11:07:48 +02:00
2020-12-02 09:45:18 +01:00
2020-06-26 11:27:28 +02:00
2021-04-21 09:20:17 +02:00
2021-02-18 10:06:45 +01:00
2021-08-04 14:49:36 +02:00
2020-06-11 10:18:57 +02:00
2021-04-23 18:03:06 +02:00
2021-04-19 15:24:33 +02:00
2020-06-29 09:57:23 +02:00
2021-03-23 15:32:22 +01:00
2021-06-08 10:56:10 +02:00
2021-04-12 12:09:36 +02:00
2021-04-21 09:20:17 +02:00
2020-06-11 10:18:59 +02:00
2020-06-11 10:18:58 +02:00
2021-04-19 09:05:57 +02:00
2021-05-11 17:24:32 +02:00
2020-06-11 10:18:59 +02:00
2021-05-08 12:11:29 +02:00
2021-05-14 09:36:37 +02:00
2021-01-06 16:26:50 +01:00
2021-04-21 09:20:17 +02:00
2020-06-11 10:18:57 +02:00
2020-06-11 10:18:59 +02:00