Skip to main content

http_request

Function http_request 

Source
pub fn http_request(
    method: &str,
    url: &str,
    headers: &[(&str, &str)],
    body: &str,
) -> Result<String, String>
Expand description

Issue an arbitrary HTTP request through the host (supports custom headers, e.g. Authorization for external model APIs). Returns the response body on 2xx.