pub struct RestClient { /* private fields */ }Implementations§
Source§impl RestClient
impl RestClient
pub fn new( base_url: Url, api_key: String, insecure: bool, mcp_client: Option<String>, ) -> Result<Self>
pub async fn get_text(&self, path: &str) -> Result<String>
Sourcepub async fn head(&self, path: &str) -> Result<StatusCode>
pub async fn head(&self, path: &str) -> Result<StatusCode>
Issue a single HEAD request and return only the response status.
pub async fn get_json<T: DeserializeOwned>(&self, path: &str) -> Result<T>
Trait Implementations§
Source§impl Clone for RestClient
impl Clone for RestClient
Source§fn clone(&self) -> RestClient
fn clone(&self) -> RestClient
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 RestClient
impl !RefUnwindSafe for RestClient
impl Send for RestClient
impl Sync for RestClient
impl Unpin for RestClient
impl UnsafeUnpin for RestClient
impl !UnwindSafe for RestClient
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