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. More... | |
| 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. More... | |
Helper functions for parsing URI query parameters.
| 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:
will result in value_len = 6 and value_ptr = "second"
| 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. |
| 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:
will result in value_len = 5 and value_ptr = "value"
| 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. |