feat: add ping endpoint with test infrastructure
Implement ping() method on OnspringClient. Set up wiremock-based test infrastructure with shared setup helper. Add tests for success and unauthorized scenarios verifying correct headers are sent.
This commit is contained in:
@@ -1 +1 @@
|
||||
|
||||
mod ping;
|
||||
|
||||
@@ -0,0 +1,12 @@
|
||||
use reqwest::Method;
|
||||
|
||||
use crate::client::OnspringClient;
|
||||
use crate::error::Result;
|
||||
|
||||
impl OnspringClient {
|
||||
/// Checks if the Onspring API is reachable.
|
||||
pub async fn ping(&self) -> Result<()> {
|
||||
self.request_no_content(Method::GET, "/Ping", &[], Option::<&()>::None)
|
||||
.await
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user