Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
uriqueryparser.h File Reference
Provides helper functions for parsing URI query parameters. More...
Go to the source code of this file.
Functions | |
| int | parse_query_parameter_value_from_uri (const char *uri, const char *parameter_name, const char **parameter_value) |
| Parse a query parameter from URI and return the size of the parameter value and a pointer to the value within the URI. | |
| int | parse_query_parameter_value_from_query (const char *query, const char *parameter_name, const char **parameter_value) |
| Parse a query parameter from a query and return the size of the parameter value and a pointer to the value within the query. | |
Detailed Description
Provides helper functions for parsing URI query parameters.
Definition in file uriqueryparser.h.
Function Documentation
| int parse_query_parameter_value_from_query | ( | const char * | query, |
| const char * | parameter_name, | ||
| const char ** | parameter_value | ||
| ) |
Parse a query parameter from a query and return the size of the parameter value and a pointer to the value within the query.
**Example usage:**
{.cpp}
char *value_ptr = NULL;
ssize_t value_len = parse_query_parameter_value("someparameter=value¶m2=second", "param2", &value_ptr);
will result in value_len = 6 and value_ptr = "second"
- Parameters:
-
query The query to parse. parameter_name The parameter name to parse from the query. [out] parameter_value A pointer to the parameter value, NULL if parameter does not exist.
- Returns:
- The size of the parameter value, -1 if parameter does not exist in the query.
Definition at line 43 of file uriqueryparser.c.
| int parse_query_parameter_value_from_uri | ( | const char * | uri, |
| const char * | parameter_name, | ||
| const char ** | parameter_value | ||
| ) |
Parse a query parameter from URI and return the size of the parameter value and a pointer to the value within the URI.
**Example usage:**
{.cpp}
char *value_ptr = NULL;
ssize_t value_len = parse_query_parameter_value_from_uri("http://www.myquery.com?someparameter=value", "someparameter", &value_ptr);
will result in value_len = 5 and value_ptr = "value"
- Parameters:
-
uri The URI to parse. parameter_name The parameter name to parse from query. [out] parameter_value A pointer to the parameter value, NULL if parameter does not exist.
- Returns:
- The size of the parameter value, -1 if parameter does not exist in the URI.
Definition at line 23 of file uriqueryparser.c.
Generated on Mon Aug 29 2022 19:53:43 by
1.7.2