#[non_exhaustive]pub struct Request {
pub url: Url,
pub content_type: &'static str,
pub body: Vec<u8>,
}Expand description
Represents data that needs to be transmitted to the receiver or payjoin directory.
Ensure the Content-Length is set to the length of body. (most libraries do this automatically)
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.url: UrlURL to send the request to.
This is full URL with scheme etc - you can pass it right to reqwest or a similar library.
content_type: &'static strThe Content-Type header to use for the request.
text/plain for v1 requests and message/ohttp-req for v2 requests.
body: Vec<u8>Bytes to be sent to the receiver.
This is properly encoded PSBT payload either in base64 in v1 or an OHTTP encapsulated payload in v2.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Request
impl RefUnwindSafe for Request
impl Send for Request
impl Sync for Request
impl Unpin for Request
impl UnwindSafe for Request
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