URL Parser.
This parser supports many of the features of RFC 3986, but is not a fully compliant URI parser.
Specifically from RFC3986 section 1.1.2:
SUPPORTED?
◆ M_url_t
◆ M_url_create()
M_url_t * M_url_create |
( |
const char * |
url_str | ) |
|
Parse URL string into structure parts.
- Parameters
-
[in] | url_str | URL string to be parsed. |
- Returns
- Parsed URL struct or NULL on error.
◆ M_url_schema()
const char * M_url_schema |
( |
M_url_t * |
url | ) |
|
Getter function
- Parameters
-
- Returns
- schema string (NULL if none)
◆ M_url_host()
const char * M_url_host |
( |
M_url_t * |
url | ) |
|
Getter function
- Parameters
-
- Returns
- host string (NULL if none)
◆ M_url_port()
const char * M_url_port |
( |
M_url_t * |
url | ) |
|
Getter function
- Parameters
-
- Returns
- port string (NULL if none)
◆ M_url_path()
const char * M_url_path |
( |
M_url_t * |
url | ) |
|
Getter function
- Parameters
-
- Returns
- path string (NULL if none)
◆ M_url_query()
const char * M_url_query |
( |
M_url_t * |
url | ) |
|
Getter function
- Parameters
-
- Returns
- query string (NULL if none)
◆ M_url_fragment()
const char * M_url_fragment |
( |
M_url_t * |
url | ) |
|
Getter function
- Parameters
-
- Returns
- fragment string (NULL if none)
◆ M_url_userinfo()
const char * M_url_userinfo |
( |
M_url_t * |
url | ) |
|
Getter function
- Parameters
-
- Returns
- userinfo string (NULL if none)
◆ M_url_port_u16()
M_uint16 M_url_port_u16 |
( |
M_url_t * |
url | ) |
|
Getter function
- Parameters
-
- Returns
- port as M_uint16 (0 if none)
◆ M_url_destroy()
void M_url_destroy |
( |
M_url_t * |
url | ) |
|
Destroy parsed URL struct
- Parameters
-