mirror of
https://github.com/cesanta/mongoose.git
synced 2026-11-01 13:10:43 +00:00
Refactor Mongoose documentation
PUBLISHED_FROM=e9a4e5c7b4a1d03b93a2a79e29de19e60e919929
This commit is contained in:
1 parent
4120f953c7
commit
12437fd7fe
87 files changed
+977
-332
No files matched your search
@@ -0,0 +1,10 @@
|
||||
---
|
||||
title: "URI"
|
||||
symbol_kind: "intro"
|
||||
decl_name: "uri.h"
|
||||
items:
|
||||
- { name: mg_parse_uri.md }
|
||||
---
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,33 @@
|
||||
---
|
||||
title: "mg_parse_uri()"
|
||||
decl_name: "mg_parse_uri"
|
||||
symbol_kind: "func"
|
||||
signature: |
|
||||
int mg_parse_uri(struct mg_str uri, struct mg_str *scheme,
|
||||
struct mg_str *user_info, struct mg_str *host,
|
||||
unsigned int *port, struct mg_str *path, struct mg_str *query,
|
||||
struct mg_str *fragment);
|
||||
---
|
||||
|
||||
Parses an URI and fills string chunks with locations of the respective
|
||||
uri components within the input uri string. NULL pointers will be
|
||||
ignored.
|
||||
|
||||
General syntax:
|
||||
|
||||
[scheme://[user_info@]]host[:port][/path][?query][#fragment]
|
||||
|
||||
Example:
|
||||
|
||||
foo.com:80
|
||||
tcp://foo.com:1234
|
||||
http://foo.com:80/bar?baz=1
|
||||
https://user:pw@foo.com:443/blah
|
||||
|
||||
`path` will include the leading slash. `query` won't include the leading `?`.
|
||||
`host` can contain embedded colons if surrounded by square brackets in order
|
||||
to support IPv6 literal addresses.
|
||||
|
||||
|
||||
Returns 0 on success, -1 on error.
|
||||
|
||||
Reference in new issue
Block a user