mirror of
https://github.com/jorisvink/kore
synced 2025-03-26 04:30:03 -04:00
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.
35 lines
1008 B
Plaintext
35 lines
1008 B
Plaintext
# python-async build config
|
|
# You can switch flavors using: kodev flavor [newflavor]
|
|
|
|
# Set to yes if you wish to produce a single binary instead
|
|
# of a dynamic library. If you set this to yes you must also
|
|
# set kore_source together with kore_flavor.
|
|
single_binary=yes
|
|
kore_source=../../
|
|
kore_flavor=PYTHON=1 CURL=1 NOTLS=1
|
|
|
|
# The flags below are shared between flavors
|
|
cflags=-Wall -Wmissing-declarations -Wshadow
|
|
cflags=-Wstrict-prototypes -Wmissing-prototypes
|
|
cflags=-Wpointer-arith -Wcast-qual -Wsign-compare
|
|
|
|
cxxflags=-Wall -Wmissing-declarations -Wshadow
|
|
cxxflags=-Wpointer-arith -Wcast-qual -Wsign-compare
|
|
|
|
# Mime types for assets served via the builtin asset_serve_*
|
|
#mime_add=txt:text/plain; charset=utf-8
|
|
#mime_add=png:image/png
|
|
#mime_add=html:text/html; charset=utf-8
|
|
|
|
dev {
|
|
# These flags are added to the shared ones when
|
|
# you build the "dev" flavor.
|
|
cflags=-g
|
|
cxxflags=-g
|
|
}
|
|
|
|
#prod {
|
|
# You can specify additional flags here which are only
|
|
# included if you build with the "prod" flavor.
|
|
#}
|