pub struct HttpTransport { /* private fields */ }Implementations§
Source§impl HttpTransport
impl HttpTransport
Sourcepub fn new(manifest: &ProtocolManifest, model: &str) -> Result<Self>
pub fn new(manifest: &ProtocolManifest, model: &str) -> Result<Self>
Create a new HttpTransport from a manifest.
If base_url_override is provided, it will be used instead of the manifest’s base_url.
This is useful for testing with mock servers.
Sourcepub fn new_with_base_url(
manifest: &ProtocolManifest,
model: &str,
base_url_override: Option<&str>,
) -> Result<Self>
pub fn new_with_base_url( manifest: &ProtocolManifest, model: &str, base_url_override: Option<&str>, ) -> Result<Self>
Create a new HttpTransport with an optional base_url override.
This is primarily for testing, allowing injection of mock server URLs.
pub async fn execute_stream_response( &self, method: &str, path: &str, request_body: &Value, client_request_id: Option<&str>, ) -> Result<Response>
pub async fn execute_stream<'a>( &'a self, method: &str, path: &str, request_body: &Value, ) -> Result<BoxStream<'a, Bytes>>
pub async fn execute_get(&self, path: &str) -> Result<Value>
pub async fn execute_service( &self, path: &str, method: &str, headers: Option<&HashMap<String, String>>, query_params: Option<&HashMap<String, String>>, ) -> Result<Value>
Auto Trait Implementations§
impl Freeze for HttpTransport
impl !RefUnwindSafe for HttpTransport
impl Send for HttpTransport
impl Sync for HttpTransport
impl Unpin for HttpTransport
impl !UnwindSafe for HttpTransport
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