Struct salvo_core::test::TestClient
source · pub struct TestClient;
test
only.Expand description
TestClient
is a type that can carry settings over multiple requests. The settings applied to the
TestClient
are applied to every request created from this TestClient
.
Implementations§
source§impl TestClient
impl TestClient
sourcepub fn get(url: impl AsRef<str>) -> RequestBuilder
pub fn get(url: impl AsRef<str>) -> RequestBuilder
Create a new RequestBuilder
with the GET method and this TestClient’s settings applied on it.
sourcepub fn post(url: impl AsRef<str>) -> RequestBuilder
pub fn post(url: impl AsRef<str>) -> RequestBuilder
Create a new RequestBuilder
with the POST method and this TestClient’s settings applied on it.
sourcepub fn put(url: impl AsRef<str>) -> RequestBuilder
pub fn put(url: impl AsRef<str>) -> RequestBuilder
Create a new RequestBuilder
with the PUT method and this TestClient’s settings applied on it.
sourcepub fn delete(url: impl AsRef<str>) -> RequestBuilder
pub fn delete(url: impl AsRef<str>) -> RequestBuilder
Create a new RequestBuilder
with the DELETE method and this TestClient’s settings applied on it.
sourcepub fn head(url: impl AsRef<str>) -> RequestBuilder
pub fn head(url: impl AsRef<str>) -> RequestBuilder
Create a new RequestBuilder
with the HEAD method and this TestClient’s settings applied on it.
sourcepub fn options(url: impl AsRef<str>) -> RequestBuilder
pub fn options(url: impl AsRef<str>) -> RequestBuilder
Create a new RequestBuilder
with the OPTIONS method and this TestClient’s settings applied on it.
sourcepub fn patch(url: impl AsRef<str>) -> RequestBuilder
pub fn patch(url: impl AsRef<str>) -> RequestBuilder
Create a new RequestBuilder
with the PATCH method and this TestClient’s settings applied on it.
sourcepub fn trace(url: impl AsRef<str>) -> RequestBuilder
pub fn trace(url: impl AsRef<str>) -> RequestBuilder
Create a new RequestBuilder
with the TRACE method and this TestClient’s settings applied on it.