Struct actix_http_test::TestServer [−][src]
pub struct TestServer { /* fields omitted */ }Expand description
Test server controller
Implementations
Construct test server url
Create GET request
Create HTTPS GET request
Create POST request
Create HTTPS POST request
Create HEAD request
Create HTTPS HEAD request
Create PUT request
Create HTTPS PUT request
Create PATCH request
Create HTTPS PATCH request
Create DELETE request
Create HTTPS DELETE request
Create OPTIONS request
Create HTTPS OPTIONS request
Connect to test HTTP server
pub async fn load_body<S>(
&mut self,
response: ClientResponse<S>
) -> Result<Bytes, PayloadError> where
S: Stream<Item = Result<Bytes, PayloadError>> + Unpin + 'static,
pub async fn ws_at(
&mut self,
path: &str
) -> Result<Framed<impl AsyncRead + AsyncWrite, Codec>, WsClientError>
pub async fn ws_at(
&mut self,
path: &str
) -> Result<Framed<impl AsyncRead + AsyncWrite, Codec>, WsClientError>
Connect to WebSocket server at a given path.
pub async fn ws(
&mut self
) -> Result<Framed<impl AsyncRead + AsyncWrite, Codec>, WsClientError>
pub async fn ws(
&mut self
) -> Result<Framed<impl AsyncRead + AsyncWrite, Codec>, WsClientError>
Connect to a WebSocket server.
Get default HeaderMap of Client.
Returns Some(&mut HeaderMap) when Client object is unique (No other clone of client exists at the same time).
Trait Implementations
Auto Trait Implementations
impl !RefUnwindSafe for TestServer
impl !Send for TestServer
impl !Sync for TestServer
impl Unpin for TestServer
impl !UnwindSafe for TestServer
Blanket Implementations
Mutably borrows from an owned value. Read more
pub fn vzip(self) -> V
Attaches the provided Subscriber to this type, returning a
WithDispatch wrapper. Read more
Attaches the current default Subscriber to this type, returning a
WithDispatch wrapper. Read more
