URL parsing. More...
Data Structures | |
| struct | vtm_url |
Enumerations | |
| enum | vtm_url_scheme { VTM_URL_SCHEME_HTTPS, VTM_URL_SCHEME_HTTP } |
Functions | |
| VTM_API int | vtm_url_parse (const char *str, struct vtm_url *url) |
| VTM_API void | vtm_url_release (struct vtm_url *url) |
| VTM_API int | vtm_url_encode (const char *s, void *buf, size_t len) |
| VTM_API int | vtm_url_decode (const char *s, void *buf, size_t len) |
Variables | |
| const char * | VTM_URL_SCHEMES [] |
| VTM_API int vtm_url_parse | ( | const char * | str, |
| struct vtm_url * | url | ||
| ) |
Parses an URL string.
| str | the URL as NUL-terminated string | |
| [out] | url | the url structure that is filled |
| VTM_API void vtm_url_release | ( | struct vtm_url * | url | ) |
Releases all allocated resources of an url struct.
| url | the url that should should be released |
| VTM_API int vtm_url_encode | ( | const char * | s, |
| void * | buf, | ||
| size_t | len | ||
| ) |
URL encoding with percent sign.
All characters except A-Z, a-Z, 0-9 and [-._~] are replaced with the percent sign + their ASCII number.
| s | the NUL-terminated input string | |
| [out] | buf | holds the encoded NUL-terminated string |
| len | the length of the buffer |
| VTM_API int vtm_url_decode | ( | const char * | s, |
| void * | buf, | ||
| size_t | len | ||
| ) |
URL decoding with percent sign.
All xx patterns are replaced with the corresponding ASCII character.
| s | the NUL-terminated input string | |
| [out] | buf | holds the decoded NUL-terminated string |
| len | the length of the buffer |
1.8.8