#include <inttypes.h>
#include <stdbool.h>
#include <arpa/inet.h>
#include <common/gru_portable.h>
#include <common/gru_status.h>
#include <string/gru_alt.h>
#include <common/gru_keypair.h>
#include <common/gru_variant.h>
#include <uriparser/Uri.h>
#include <collection/gru_list.h>
Go to the source code of this file.
◆ gru_uri_format_opt_t
◆ gru_uri_parse_opt_t
◆ gru_uri_t
◆ gru_uri_format_opt_t_
Enumerator |
---|
GRU_URI_FORMAT_NONE | |
GRU_URI_FORMAT_PORT | Formats only scheme and host.
|
GRU_URI_FORMAT_PATH | Formats only scheme, host and port if available.
|
GRU_URI_FORMAT_DEFAULT | Formats scheme, host, port and path if available.
|
◆ gru_uri_parse_opt_t_
Enumerator |
---|
GRU_URI_PARSE_DEFAULT | |
GRU_URI_PARSE_STRIP | |
◆ gru_uri_cleanup()
Cleans up a URI object.
- Parameters
-
uri | a pointer to a URI object to clean |
◆ gru_uri_clone()
Clone a URI object.
- Parameters
-
other | the object to clone |
status | status object |
- Returns
- A cloned object that must's be cleaned up after use. Check the status object to determine whether cloning was successful or not
◆ gru_uri_format()
A more elaborate URI string converter that can filter parts of the URI.
- Parameters
-
uri | a pointer to an URI object |
fopt | formatting options (see gru_uri_format_opt_t) |
status | status object |
- Returns
- a new URI string that must be free'd after use
◆ gru_uri_parse()
Default URI parser.
- Parameters
-
uri | URI string (ie.: scheme://host:port/path) |
status | status object |
- Returns
- A parsed URI object with each component of the URI broken down
◆ gru_uri_parse_ex()
URI parser with additional options.
- Parameters
-
uri | URI string (ie.: scheme://host:port/path) |
parseopt | parse options (see gru_uri_format_opt_t) |
status | status object |
- Returns
- A parsed URI object with each component of the URI broken down
◆ gru_uri_set_path()
Sets the URI path.
- Parameters
-
uri | a pointer to an URI object |
path | the path |
- Returns
- true if success or false otherwise
◆ gru_uri_set_scheme()
Sets the scheme in a URI object.
- Parameters
-
uri | a pointer to an URI object |
scheme | the scheme to set it to |
- Returns
- true if success or false otherwise
◆ gru_uri_simple_format()
Converts a URI object to a string.
- Parameters
-
uri | a pointer to an URI object |
status | status object |
- Returns
- a new URI string that must be free'd after use