Struct sota::http::test_client::TestClient [] [src]

pub struct TestClient {
    // some fields omitted
}

The TestClient will return HTTP responses from an existing list of strings.

Methods

impl TestClient
[src]

fn from(responses: Vec<String>) -> TestClient

Create a new TestClient that will return these responses.

Trait Implementations

impl Default for TestClient
[src]

fn default() -> Self

Returns the "default value" for a type. Read more

impl Client for TestClient
[src]

fn chan_request(&self, req: Request, resp_tx: Sender<Response>)

fn is_testing(&self) -> bool

fn send_request(&self, req: Request) -> Receiver<Response>

fn get(&self, url: Url, body: Option<Vec<u8>>) -> Receiver<Response>

fn post(&self, url: Url, body: Option<Vec<u8>>) -> Receiver<Response>

fn put(&self, url: Url, body: Option<Vec<u8>>) -> Receiver<Response>