pub struct RequestInterface { /* private fields */ }
Expand description
Structure-interface to send different network requests
Implementations§
Source§impl RequestInterface
impl RequestInterface
Sourcepub async fn send_get_request(&self, url: &String) -> Result<Response, String>
pub async fn send_get_request(&self, url: &String) -> Result<Response, String>
Function send GET request to URL and return response or string error
Sourcepub async fn send_post_request(
&self,
payload: &Value,
url: &String,
) -> Result<Response, String>
pub async fn send_post_request( &self, payload: &Value, url: &String, ) -> Result<Response, String>
Function send POST request to URL and return response or string error
Sourcepub async fn send_create_task_request(
&self,
payload: &CreateTaskRequest,
enp_postfix: &EnpPostfix,
) -> Result<Value, String>
pub async fn send_create_task_request( &self, payload: &CreateTaskRequest, enp_postfix: &EnpPostfix, ) -> Result<Value, String>
Function send createTask
request to URL and return JSON response or string error
Sourcepub async fn send_get_result_request(
&self,
payload: &ResultTaskRequest,
enp_postfix: &EnpPostfix,
) -> Result<Value, String>
pub async fn send_get_result_request( &self, payload: &ResultTaskRequest, enp_postfix: &EnpPostfix, ) -> Result<Value, String>
Function send getTaskResult
request to URL and return JSON response or string error
Trait Implementations§
Auto Trait Implementations§
impl Freeze for RequestInterface
impl !RefUnwindSafe for RequestInterface
impl Send for RequestInterface
impl Sync for RequestInterface
impl Unpin for RequestInterface
impl !UnwindSafe for RequestInterface
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