pub struct NativeClient(/* private fields */);
Expand description
A Client to make Requests with.
Trait Implementations§
Source§impl Clone for NativeClient
impl Clone for NativeClient
Source§impl Debug for NativeClient
impl Debug for NativeClient
Source§impl Default for NativeClient
impl Default for NativeClient
Source§fn default() -> NativeClient
fn default() -> NativeClient
Returns the “default value” for a type. Read more
Source§impl OpenWhisk for NativeClient
impl OpenWhisk for NativeClient
Source§impl Service for NativeClient
impl Service for NativeClient
Source§fn new_request(
&self,
method: Option<HttpMethods>,
url: &str,
use_auth: Option<(&str, &str)>,
body: Option<Value>,
) -> Result<Self::Output, String>
fn new_request( &self, method: Option<HttpMethods>, url: &str, use_auth: Option<(&str, &str)>, body: Option<Value>, ) -> Result<Self::Output, String>
Creates New Request and Returns reqwest::blocking::RequestBuilder
§Arguments
method
- Option of HTTPMethodsurl
- API Host urluse_auth
- Option of tuple conatining Username and Passwordbody
- Option of value which can have parameters necessary for the body of request
Source§fn invoke_request(&self, request: Self::Output) -> Result<Value, String>
fn invoke_request(&self, request: Self::Output) -> Result<Value, String>
To invoke request and get response out of request execution
§Arguments
request
- Http request with url,auth and body
type Output = RequestBuilder
Auto Trait Implementations§
impl Freeze for NativeClient
impl !RefUnwindSafe for NativeClient
impl Send for NativeClient
impl Sync for NativeClient
impl Unpin for NativeClient
impl !UnwindSafe for NativeClient
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