pub struct X402ValidateRequest {
pub method: X402ValidateRequestMethod,
pub resource: HttpsUrl,
}Expand description
Request to validate an x402 endpoint’s bazaar-discovery configuration.
JSON schema
{
"description": "Request to validate an x402 endpoint's bazaar-discovery configuration.",
"examples": [
{
"method": "GET",
"resource": "https://api.example.com/weather/forecast"
}
],
"type": "object",
"required": [
"resource"
],
"properties": {
"method": {
"description": "The HTTP method used to probe the endpoint. Only GET and POST are supported; other verbs are intentionally rejected because x402 resources are expected to respond to these methods.",
"default": "GET",
"examples": [
"GET"
],
"type": "string",
"enum": [
"GET",
"POST"
]
},
"resource": {
"description": "HTTPS URL of the x402 endpoint to validate. Must use the `https://` scheme.",
"examples": [
"https://api.example.com/weather/forecast"
],
"allOf": [
{
"$ref": "#/components/schemas/HttpsUrl"
}
]
}
}
}Fields§
§method: X402ValidateRequestMethodThe HTTP method used to probe the endpoint. Only GET and POST are supported; other verbs are intentionally rejected because x402 resources are expected to respond to these methods.
resource: HttpsUrlHTTPS URL of the x402 endpoint to validate. Must use the https:// scheme.
Implementations§
Source§impl X402ValidateRequest
impl X402ValidateRequest
pub fn builder() -> X402ValidateRequest
Trait Implementations§
Source§impl Clone for X402ValidateRequest
impl Clone for X402ValidateRequest
Source§impl Debug for X402ValidateRequest
impl Debug for X402ValidateRequest
Source§impl<'de> Deserialize<'de> for X402ValidateRequest
impl<'de> Deserialize<'de> for X402ValidateRequest
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 From<&X402ValidateRequest> for X402ValidateRequest
impl From<&X402ValidateRequest> for X402ValidateRequest
Source§fn from(value: &X402ValidateRequest) -> Self
fn from(value: &X402ValidateRequest) -> Self
Converts to this type from the input type.
Source§impl From<X402ValidateRequest> for X402ValidateRequest
impl From<X402ValidateRequest> for X402ValidateRequest
Source§fn from(value: X402ValidateRequest) -> Self
fn from(value: X402ValidateRequest) -> Self
Converts to this type from the input type.
Source§impl Serialize for X402ValidateRequest
impl Serialize for X402ValidateRequest
Source§impl TryFrom<X402ValidateRequest> for X402ValidateRequest
impl TryFrom<X402ValidateRequest> for X402ValidateRequest
Source§type Error = ConversionError
type Error = ConversionError
The type returned in the event of a conversion error.
Source§fn try_from(value: X402ValidateRequest) -> Result<Self, ConversionError>
fn try_from(value: X402ValidateRequest) -> Result<Self, ConversionError>
Performs the conversion.
Auto Trait Implementations§
impl Freeze for X402ValidateRequest
impl RefUnwindSafe for X402ValidateRequest
impl Send for X402ValidateRequest
impl Sync for X402ValidateRequest
impl Unpin for X402ValidateRequest
impl UnsafeUnpin for X402ValidateRequest
impl UnwindSafe for X402ValidateRequest
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