Commit Graph

6 Commits

Author SHA1 Message Date
Frederic Cambus d9673857d8 Fix a couple of typos in various places. 2020-09-08 13:01:18 +02:00
Joris Vink 0430c36a08 Adjust for new kore_curl_init() 2019-10-21 21:20:16 +02:00
Frederic Cambus 78ff364c8d Fix a couple of typos in the bundled examples. 2019-06-09 21:37:10 +02:00
Joris Vink 7a814f5786 less lies, more truth. 2019-05-13 23:14:12 +02:00
Joris Vink d0a6958747 Let http_state_create() take an "onfree" callback.
This function is called when an HTTP request is being free'd,
allowing you to perform any sort of state cleanup attached
to the HTTP request.
2019-04-28 21:48:16 +02:00
Joris Vink 2c88bc6120 Add asynchronous libcurl support.
This commit adds the CURL=1 build option. When enabled allows
you to schedule CURL easy handles onto the Kore event loop.

It also adds an easy to use HTTP client API that abstracts away the
settings required from libcurl to make HTTP requests.

Tied together with HTTP request state machines this means you can
write fully asynchronous HTTP client requests in an easy way.

Additionally this exposes that API to the Python code as well
allowing you do to things like:

	client = kore.httpclient("https://kore.io")
	status, body = await client.get()

Introduces 2 configuration options:
	- curl_recv_max
		Max incoming bytes for a response.

	- curl_timeout
		Timeout in seconds before a transfer is cancelled.

This API also allows you to take the CURL easy handle and send emails
with it, run FTP, etc. All asynchronously.
2019-04-24 00:15:17 +02:00