pub struct HttpClient { /* private fields */ }Expand description
HTTP client for executing OpenAPI requests
Implementations§
Source§impl HttpClient
impl HttpClient
Sourcepub fn with_timeout(timeout_seconds: u64) -> Self
pub fn with_timeout(timeout_seconds: u64) -> Self
Create a new HTTP client with custom timeout
Sourcepub fn with_base_url(self, base_url: Url) -> Result<Self, OpenApiError>
pub fn with_base_url(self, base_url: Url) -> Result<Self, OpenApiError>
Set the base URL for all requests
Sourcepub async fn execute_tool_call(
&self,
tool_metadata: &ToolMetadata,
arguments: &Value,
) -> Result<HttpResponse, OpenApiError>
pub async fn execute_tool_call( &self, tool_metadata: &ToolMetadata, arguments: &Value, ) -> Result<HttpResponse, OpenApiError>
Execute an OpenAPI tool call
Trait Implementations§
Auto Trait Implementations§
impl Freeze for HttpClient
impl !RefUnwindSafe for HttpClient
impl Send for HttpClient
impl Sync for HttpClient
impl Unpin for HttpClient
impl !UnwindSafe for HttpClient
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