pub struct RequestUtils;Expand description
Request utility methods
Implementations§
Source§impl RequestUtils
impl RequestUtils
Sourcepub fn build_query_string(params: &HashMap<String, Value>) -> String
pub fn build_query_string(params: &HashMap<String, Value>) -> String
Builds a URL query string from parameters
Sourcepub fn handle_http_error(status_code: u16, response: &str) -> Error
pub fn handle_http_error(status_code: u16, response: &str) -> Error
Handles HTTP error responses by mapping status codes to appropriate errors
Sourcepub fn safe_string(dict: &Value, key: &str) -> Option<String>
pub fn safe_string(dict: &Value, key: &str) -> Option<String>
Safely extracts a string value from a JSON object
Sourcepub fn safe_integer(dict: &Value, key: &str) -> Option<i64>
pub fn safe_integer(dict: &Value, key: &str) -> Option<i64>
Safely extracts an integer value from a JSON object
Auto Trait Implementations§
impl Freeze for RequestUtils
impl RefUnwindSafe for RequestUtils
impl Send for RequestUtils
impl Sync for RequestUtils
impl Unpin for RequestUtils
impl UnwindSafe for RequestUtils
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