pub struct RequestProfile {
pub method: Method,
pub url: Url,
pub params: Option<Value>,
pub headers: HeaderMap,
pub body: Option<Value>,
}Expand description
Configuration for a single HTTP request.
This structure defines all the parameters needed to make an HTTP request, including method, URL, headers, query parameters, and body content. It serves as the base configuration for both individual requests and request comparisons.
§Examples
use xdiff_live::config::RequestProfile;
use reqwest::Method;
use url::Url;
let profile = RequestProfile {
method: Method::GET,
url: Url::parse("https://api.example.com/users").unwrap(),
params: None,
headers: Default::default(),
body: None,
};Fields§
§method: MethodHTTP method (GET, POST, PUT, DELETE, etc.)
url: UrlTarget URL for the request
params: Option<Value>Query parameters as JSON value
headers: HeaderMapHTTP headers for the request
body: Option<Value>Request body content as JSON value
Implementations§
Trait Implementations§
Source§impl Clone for RequestProfile
impl Clone for RequestProfile
Source§fn clone(&self) -> RequestProfile
fn clone(&self) -> RequestProfile
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 moreSource§impl Debug for RequestProfile
impl Debug for RequestProfile
Source§impl<'de> Deserialize<'de> for RequestProfile
impl<'de> Deserialize<'de> for RequestProfile
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl FromStr for RequestProfile
impl FromStr for RequestProfile
Source§impl Serialize for RequestProfile
impl Serialize for RequestProfile
Source§impl ValidateConfig for RequestProfile
impl ValidateConfig for RequestProfile
Auto Trait Implementations§
impl Freeze for RequestProfile
impl RefUnwindSafe for RequestProfile
impl Send for RequestProfile
impl Sync for RequestProfile
impl Unpin for RequestProfile
impl UnsafeUnpin for RequestProfile
impl UnwindSafe for RequestProfile
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