pub struct HttpTransport { /* private fields */ }Expand description
POSTs a run to an HTTP endpoint and streams the response.
Implementations§
Source§impl HttpTransport
impl HttpTransport
Sourcepub fn new(url: impl AsRef<str>) -> Result<Self>
pub fn new(url: impl AsRef<str>) -> Result<Self>
A transport pointed at an agent’s run endpoint, with default settings. The default client does not follow redirects.
§Errors
Error::Config when the URL does not parse, or the HTTP client cannot
be built, or remote HTTP credentials require explicit opt-in.
Sourcepub fn builder(url: impl AsRef<str>) -> HttpTransportBuilder
pub fn builder(url: impl AsRef<str>) -> HttpTransportBuilder
A builder, for headers, timeouts, or a pre-configured client.
Trait Implementations§
Source§impl Clone for HttpTransport
impl Clone for HttpTransport
Source§impl Debug for HttpTransport
impl Debug for HttpTransport
Source§impl Transport for HttpTransport
impl Transport for HttpTransport
Source§fn run(&self, input: RunAgentInput) -> TransportFuture
fn run(&self, input: RunAgentInput) -> TransportFuture
Starts a run and connects to its stream. Read more
Auto Trait Implementations§
impl !RefUnwindSafe for HttpTransport
impl !UnwindSafe for HttpTransport
impl Freeze for HttpTransport
impl Send for HttpTransport
impl Sync for HttpTransport
impl Unpin for HttpTransport
impl UnsafeUnpin 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