pub struct HttpRequest {
pub method: &'static str,
pub url: String,
pub headers: Vec<(String, String)>,
pub body: String,
}Expand description
An HTTP request ready to be sent.
This struct contains all the information needed to make an HTTP request, but does NOT include any HTTP client implementation.
Fields§
§method: &'static strHTTP method (always POST for LLM APIs)
url: StringFull URL
headers: Vec<(String, String)>Headers as key-value pairs
body: StringJSON body as string
Trait Implementations§
Source§impl Clone for HttpRequest
impl Clone for HttpRequest
Source§fn clone(&self) -> HttpRequest
fn clone(&self) -> HttpRequest
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for HttpRequest
impl RefUnwindSafe for HttpRequest
impl Send for HttpRequest
impl Sync for HttpRequest
impl Unpin for HttpRequest
impl UnsafeUnpin for HttpRequest
impl UnwindSafe for HttpRequest
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