myMPD
Internal API documentation
Loading...
Searching...
No Matches
parser.h File Reference

Webserver URL parser functions. More...

#include "dist/mongoose/mongoose.h"
#include "dist/sds/sds.h"
#include "src/lib/list/list.h"
Include dependency graph for parser.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

sds get_uri_param (struct mg_str *query, const char *name)
struct t_listwebserver_parse_arguments (struct mg_str *query)

Detailed Description

Webserver URL parser functions.

Function Documentation

◆ get_uri_param()

sds get_uri_param ( struct mg_str * query,
const char * name )

Gets and decodes an url parameter. The key will not be url decoded before matching.

Parameters
queryQuery string to parse
nameName to get, you must append "=" to the name
Returns
URL decoded value or NULL on error

◆ webserver_parse_arguments()

struct t_list * webserver_parse_arguments ( struct mg_str * query)

Public functions Extract arguments from query parameters. Keys and values are decodeded.

Parameters
queryQuery string to parse
Returns
Parsed arguments as t_list struct.