pub struct HttpTransport { /* private fields */ }Expand description
HTTP transport for communicating with a Haystack server.
Sends requests as encoded grids over HTTP using the configured wire format
(default: text/zinc). GET is used for side-effect-free ops; POST for all others.
Implementations§
Source§impl HttpTransport
impl HttpTransport
Sourcepub fn new(base_url: &str, auth_token: String) -> Self
pub fn new(base_url: &str, auth_token: String) -> Self
Create a new HTTP transport.
base_url should be the server API root (e.g. http://localhost:8080/api).
auth_token is the bearer token obtained from SCRAM authentication.
Sourcepub fn with_format(base_url: &str, auth_token: String, format: &str) -> Self
pub fn with_format(base_url: &str, auth_token: String, format: &str) -> Self
Create a new HTTP transport with a specific wire format.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for HttpTransport
impl !RefUnwindSafe for HttpTransport
impl Send for HttpTransport
impl Sync for HttpTransport
impl Unpin for HttpTransport
impl UnsafeUnpin 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