HTTP request handler.
More...
|
bool | request_handler_api (struct mg_connection *nc, sds body, struct mg_str *auth_header, struct t_mg_user_data *mg_user_data) |
|
bool | request_handler_script_api (struct mg_connection *nc, sds body) |
|
void | request_handler_browse (struct mg_connection *nc, struct mg_http_message *hm, struct t_mg_user_data *mg_user_data) |
|
void | request_handler_proxy (struct mg_connection *nc, struct mg_http_message *hm, struct mg_connection *backend_nc) |
|
void | request_handler_proxy_covercache (struct mg_connection *nc, struct mg_http_message *hm, struct mg_connection *backend_nc) |
|
void | request_handler_serverinfo (struct mg_connection *nc) |
|
void | request_handler_ca (struct mg_connection *nc, struct mg_http_message *hm, struct t_mg_user_data *mg_user_data) |
|
void | request_handler_extm3u (struct mg_connection *nc, struct mg_http_message *hm, struct t_mg_user_data *mg_user_data) |
|
◆ request_handler_api()
bool request_handler_api |
( |
struct mg_connection * |
nc, |
|
|
sds |
body, |
|
|
struct mg_str * |
auth_header, |
|
|
struct t_mg_user_data * |
mg_user_data |
|
) |
| |
Request handler for api requests /api
- Parameters
-
nc | mongoose connection |
body | http body (jsonrpc request) |
auth_header | Authentication header (myMPD session) |
mg_user_data | webserver configuration |
- Returns
- true on success, else false
◆ request_handler_browse()
void request_handler_browse |
( |
struct mg_connection * |
nc, |
|
|
struct mg_http_message * |
hm, |
|
|
struct t_mg_user_data * |
mg_user_data |
|
) |
| |
Request handler for /browse
- Parameters
-
nc | mongoose connection |
hm | http message |
mg_user_data | webserver configuration |
◆ request_handler_ca()
void request_handler_ca |
( |
struct mg_connection * |
nc, |
|
|
struct mg_http_message * |
hm, |
|
|
struct t_mg_user_data * |
mg_user_data |
|
) |
| |
Request handler for /ca.crt
- Parameters
-
nc | mongoose connection |
hm | http message |
mg_user_data | webserver configuration |
◆ request_handler_extm3u()
void request_handler_extm3u |
( |
struct mg_connection * |
nc, |
|
|
struct mg_http_message * |
hm, |
|
|
struct t_mg_user_data * |
mg_user_data |
|
) |
| |
Request handler for /webradio to retrieve an extm3u for a webradio. Sends the request to the mympd_api thread.
- Parameters
-
nc | mongoose connection |
hm | http message |
mg_user_data | webserver configuration |
◆ request_handler_proxy()
void request_handler_proxy |
( |
struct mg_connection * |
nc, |
|
|
struct mg_http_message * |
hm, |
|
|
struct mg_connection * |
backend_nc |
|
) |
| |
Request handler for proxy connections /proxy
- Parameters
-
nc | mongoose connection |
hm | http body |
backend_nc | mongoose backend connection |
◆ request_handler_proxy_covercache()
void request_handler_proxy_covercache |
( |
struct mg_connection * |
nc, |
|
|
struct mg_http_message * |
hm, |
|
|
struct mg_connection * |
backend_nc |
|
) |
| |
Request handler for proxy connections /proxy-covercache
- Parameters
-
nc | mongoose connection |
hm | http body |
backend_nc | mongoose backend connection |
◆ request_handler_script_api()
bool request_handler_script_api |
( |
struct mg_connection * |
nc, |
|
|
sds |
body |
|
) |
| |
Request handler for script api requests /api/script
- Parameters
-
nc | mongoose connection |
body | http body (jsonrpc request) |
- Returns
- true on success, else false
◆ request_handler_serverinfo()
void request_handler_serverinfo |
( |
struct mg_connection * |
nc | ) |
|
Request handler for /serverinfo
- Parameters
-