#include <inttypes.h>
#include <stdbool.h>
#include <common/gru_status.h>
#include <string/gru_alt.h>
#include <uriparser/Uri.h>
Go to the source code of this file.
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.
|
Enumerator |
---|
GRU_URI_PARSE_DEFAULT |
|
GRU_URI_PARSE_STRIP |
|
Cleans up a URI object.
- Parameters
-
uri | a pointer to a URI object to clean |
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
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
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
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
Sets the URI path.
- Parameters
-
uri | a pointer to an URI object |
path | the path |
- Returns
- true if success or false otherwise
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
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