pub trait HttpClient {
// Required method
fn get(&self, url: &str) -> Result<String, ProgramExit>;
}Expand description
Http client trait to make HTTP calls.
Required Methods§
Sourcefn get(&self, url: &str) -> Result<String, ProgramExit>
fn get(&self, url: &str) -> Result<String, ProgramExit>
Make a GET HTTP call to given url.
§Arguments
url- the url to which to make the HTTP call.
§Returns
A result containing the response body of HTTP call if successful, or
a ProgramExit on error (e.g. 4xx, network issues…).