Module pretend::client [−][src]
Expand description
Client traits
This module contains traits to be implemented by a pretend
client. pretend
clients
implementations are responsible of executing the actual HTTP requests. Implementations
delegates to other crates.
pretend
support 3 kind of clients:
Client
for asynchronous clientsLocalClient
for asynchronous local clients (clients that are notSend
+Sync
)BlockingClient
for blocking clients
These traits wrap the underlying HTTP client and are responsible of executing the request
via execute
. This method takes a method, url, header and body (as raw bytes) and should
return a response with raw bytes as body.
Since this crate uses async_trait
to support futures in trait, Client
implementations should be marked with #[client::async_trait]
and
LocalClient
should use #[client::async_trait(?Send)]
.
Structs
Bytes | A cheaply cloneable and sliceable chunk of contiguous memory. |
Method | The Request Method (VERB) |
Traits
BlockingClient |
|
Client |
|
LocalClient |
|
Attribute Macros
async_trait |