Skip to main content

fetch

Function fetch 

Source
pub fn fetch(
    method: &str,
    url: &str,
    content_type: &str,
    body: &[u8],
) -> Result<FetchResponse, i64>
Expand description

Perform an HTTP request. Returns the status code and response body.

content_type sets the Content-Type header (pass "" to omit). Protobuf is the native format — use "application/protobuf" for binary payloads.