commit 3590da749813ff2400a6722bd88d9665d93a7ea9
parent 3a3eb5153c07ada8f0c2fe53a864a852f5ee8bf4
Author: Joris Vink <joris@coders.se>
Date: Mon, 13 May 2019 23:20:00 +0200
link some stuff together
Diffstat:
1 file changed, 13 insertions(+), 4 deletions(-)
diff --git a/api/curl.md b/api/curl.md
@@ -27,13 +27,22 @@ Kore must be built with CURL=1 in order to use this API.
See the included [example](https://github.com/jorisvink/kore/tree/master/examples/async-curl) in the Kore source tree for an implementation of this API.
-## The CURL handle
+## The data structure
-Once a kore\_curl context has been initialized with kore\_curl\_init() you
+The kore\_curl data structure contains the CURL easy handle, some information
+about HTTP call results and book-keeping information.
+
+Once a kore\_curl context has been initialized with [kore\_curl\_init()](#init) you
may access the **handle** member to configure libcurl yourself if you
would like modify certain libcurl options yourself. See [settings](#settings)
for an overview of which libcurl options are set by the API itself.
+### HTTP request status
+
+You may be interested in the status code for an HTTP client request. This is
+found under the http.status member of the data structure once a call was
+made.
+
---
# kore\_curl\_init {#init}
@@ -224,7 +233,7 @@ A pointer to the response as a C string.
void kore_curl_http_setup(struct kore_curl *client, int method, const void *data, size_t len);
```
### Description
-Setup an HTTP client request. You must have called kore\_curl\_init() first.
+Setup an HTTP client request. You must have called [kore\_curl\_init()](#init) first.
| Parameter | Description |
| -- | -- |
@@ -277,7 +286,7 @@ Nothing
int kore_curl_http_get_header(struct kore_curl *client, const char *header. const char **out);
```
### Description
-Obtain an HTTP header from the response (if kore\_curl\_success() was 1).
+Obtain an HTTP header from the response (if [kore\_curl\_success()](#success) was 1).
| Parameter | Description |
| -- | -- |