Struct openwhisk_rust::NativeClient
source · pub struct NativeClient(_);
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
§type Output = NativeClient
type Output = NativeClient
NativeClient - Http Client (Here client is Reqwest Client)
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