Struct kvarn_testing::Server
source · pub struct Server { /* private fields */ }
Expand description
A port returned by ServerBuilder::run
to connect to.
Implementations§
source§impl Server
impl Server
sourcepub fn get(&self, path: impl AsRef<str>) -> RequestBuilder
pub fn get(&self, path: impl AsRef<str>) -> RequestBuilder
Make a request to path
with the selected method.
sourcepub fn post(&self, path: impl AsRef<str>) -> RequestBuilder
pub fn post(&self, path: impl AsRef<str>) -> RequestBuilder
Make a request to path
with the selected method.
sourcepub fn put(&self, path: impl AsRef<str>) -> RequestBuilder
pub fn put(&self, path: impl AsRef<str>) -> RequestBuilder
Make a request to path
with the selected method.
sourcepub fn delete(&self, path: impl AsRef<str>) -> RequestBuilder
pub fn delete(&self, path: impl AsRef<str>) -> RequestBuilder
Make a request to path
with the selected method.
sourcepub fn head(&self, path: impl AsRef<str>) -> RequestBuilder
pub fn head(&self, path: impl AsRef<str>) -> RequestBuilder
Make a request to path
with the selected method.
sourcepub fn options(&self, path: impl AsRef<str>) -> RequestBuilder
pub fn options(&self, path: impl AsRef<str>) -> RequestBuilder
Make a request to path
with the selected method.
sourcepub fn connect(&self, path: impl AsRef<str>) -> RequestBuilder
pub fn connect(&self, path: impl AsRef<str>) -> RequestBuilder
Make a request to path
with the selected method.
sourcepub fn patch(&self, path: impl AsRef<str>) -> RequestBuilder
pub fn patch(&self, path: impl AsRef<str>) -> RequestBuilder
Make a request to path
with the selected method.
sourcepub fn trace(&self, path: impl AsRef<str>) -> RequestBuilder
pub fn trace(&self, path: impl AsRef<str>) -> RequestBuilder
Make a request to path
with the selected method.
sourcepub fn client(&self) -> ClientBuilder
pub fn client(&self) -> ClientBuilder
Get a reqwest::ClientBuilder
with the Self::cert
accepted.
sourcepub fn cert(&self) -> Option<&Certificate>
pub fn cert(&self) -> Option<&Certificate>
Gets the certificate, if any. This dictates whether or not HTTPS should be on.
sourcepub fn get_shutdown_manager(&self) -> Arc<Manager>
pub fn get_shutdown_manager(&self) -> Arc<Manager>
Gets a shutdown::Manager
which is Send
.
You can shut down Kvarn from another thread using this.