mirror of
https://github.com/cesanta/mongoose.git
synced 2026-10-31 13:00:49 +00:00
Fix mongoose docs generation
PUBLISHED_FROM=331821dcd1f7dc8a94581cd8a9b51aa00a89fddc
This commit is contained in:
1 parent
ab000c684a
commit
3eb4eb8074
166 files changed
+3125
No files matched your search
@@ -0,0 +1,12 @@
|
||||
---
|
||||
title: "Client API reference"
|
||||
symbol_kind: "intro"
|
||||
decl_name: "mg_http_client.h"
|
||||
items:
|
||||
- { name: mg_connect_http.md }
|
||||
- { name: mg_connect_http_opt.md }
|
||||
- { name: mg_http_create_digest_auth_header.md }
|
||||
---
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,33 @@
|
||||
---
|
||||
title: "mg_connect_http()"
|
||||
decl_name: "mg_connect_http"
|
||||
symbol_kind: "func"
|
||||
signature: |
|
||||
struct mg_connection *mg_connect_http(
|
||||
struct mg_mgr *mgr,
|
||||
MG_CB(mg_event_handler_t event_handler, void *user_data);
|
||||
---
|
||||
|
||||
Helper function that creates an outbound HTTP connection.
|
||||
|
||||
`url` is the URL to fetch. It must be properly URL-encoded, e.g. have
|
||||
no spaces, etc. By default, `mg_connect_http()` sends the Connection and
|
||||
Host headers. `extra_headers` is an extra HTTP header to send, e.g.
|
||||
`"User-Agent: my-app\r\n"`.
|
||||
If `post_data` is NULL, then a GET request is created. Otherwise, a POST
|
||||
request is created with the specified POST data. Note that if the data being
|
||||
posted is a form submission, the `Content-Type` header should be set
|
||||
accordingly (see example below).
|
||||
|
||||
Examples:
|
||||
|
||||
```c
|
||||
nc1 = mg_connect_http(mgr, ev_handler_1, "http://www.google.com", NULL,
|
||||
NULL);
|
||||
nc2 = mg_connect_http(mgr, ev_handler_1, "https://github.com", NULL, NULL);
|
||||
nc3 = mg_connect_http(
|
||||
mgr, ev_handler_1, "my_server:8000/form_submit/",
|
||||
"Content-Type: application/x-www-form-urlencoded\r\n",
|
||||
"var_1=value_1&var_2=value_2");
|
||||
```
|
||||
|
||||
@@ -0,0 +1,15 @@
|
||||
---
|
||||
title: "mg_connect_http_opt()"
|
||||
decl_name: "mg_connect_http_opt"
|
||||
symbol_kind: "func"
|
||||
signature: |
|
||||
struct mg_connection *mg_connect_http_opt(
|
||||
struct mg_mgr *mgr, MG_CB(mg_event_handler_t ev_handler, void *user_data);
|
||||
---
|
||||
|
||||
Helper function that creates an outbound HTTP connection.
|
||||
|
||||
Mostly identical to mg_connect_http, but allows you to provide extra
|
||||
*parameters
|
||||
(for example, SSL parameters)
|
||||
|
||||
@@ -0,0 +1,13 @@
|
||||
---
|
||||
title: "mg_http_create_digest_auth_header()"
|
||||
decl_name: "mg_http_create_digest_auth_header"
|
||||
symbol_kind: "func"
|
||||
signature: |
|
||||
int mg_http_create_digest_auth_header(char *buf, size_t buf_len,
|
||||
const char *method, const char *uri,
|
||||
const char *auth_domain, const char *user,
|
||||
const char *passwd, const char *nonce);
|
||||
---
|
||||
|
||||
Creates digest authentication header for a client request.
|
||||
|
||||
Reference in new issue
Block a user