pub async fn main_server_request(
host: Option<&String>,
port: Option<u16>,
url_path: &str,
) -> Result<String>Expand description
Submit a request to the main with ports server and return a JSON result on success
url_path should begin with ‘/’ and contains the API path and any parameters for the request.
You don’t need to provide host or port unless you wish to override the defaults.
This function assumes some defaults to save having to build the request from scratch but it is fine to do that and not use this function. If doing that yourself, it is recommended that you use the helper function make_main_server_url() to construct the host/port part of the URL.