pub struct TestClient { /* private fields */ }Expand description
Calls an app in-process, see the module documentation
Implementations§
Source§impl TestClient
impl TestClient
pub fn new(app: App) -> Self
Remember cookies set by responses and send them on later requests
Value of a cookie in the jar
Forget all cookies
pub fn request(&self, method: &str, path: &str) -> TestRequest
pub fn get(&self, path: &str) -> TestRequest
pub fn post(&self, path: &str) -> TestRequest
pub fn put(&self, path: &str) -> TestRequest
pub fn patch(&self, path: &str) -> TestRequest
pub fn delete(&self, path: &str) -> TestRequest
pub fn head(&self, path: &str) -> TestRequest
pub fn options(&self, path: &str) -> TestRequest
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for TestClient
impl !UnwindSafe for TestClient
impl Freeze for TestClient
impl Send for TestClient
impl Sync for TestClient
impl Unpin for TestClient
impl UnsafeUnpin for TestClient
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more