Struct psibase::HttpRequest
source · pub struct HttpRequest {
pub host: String,
pub rootHost: String,
pub method: String,
pub target: String,
pub contentType: String,
pub body: Hex<Vec<u8>>,
}
Expand description
An HTTP Request
Most services receive this via their serveSys
action. The http-server
service receives it via its serve
exported function.
Fields§
§host: String
Fully-qualified domain name
rootHost: String
host name, but without service subdomain
method: String
“GET” or “POST”
target: String
Absolute path, e.g. “/index.js”
contentType: String
“application/json”, “text/html”, …
body: Hex<Vec<u8>>
Request body, e.g. POST data
Trait Implementations§
source§impl Clone for HttpRequest
impl Clone for HttpRequest
source§fn clone(&self) -> HttpRequest
fn clone(&self) -> HttpRequest
Returns a copy of the value. Read more
1.0.0 · 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 HttpRequest
impl Debug for HttpRequest
source§impl Default for HttpRequest
impl Default for HttpRequest
source§fn default() -> HttpRequest
fn default() -> HttpRequest
Returns the “default value” for a type. Read more
source§impl<'de> Deserialize<'de> for HttpRequest
impl<'de> Deserialize<'de> for HttpRequest
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 Pack for HttpRequest
impl Pack for HttpRequest
source§impl PartialEq for HttpRequest
impl PartialEq for HttpRequest
source§fn eq(&self, other: &HttpRequest) -> bool
fn eq(&self, other: &HttpRequest) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl Reflect for HttpRequest
impl Reflect for HttpRequest
type StaticType = HttpRequest
fn reflect<V: Visitor>(visitor: V) -> V::Return
source§impl Serialize for HttpRequest
impl Serialize for HttpRequest
source§impl ToKey for HttpRequest
impl ToKey for HttpRequest
source§impl<'a> Unpack<'a> for HttpRequest
impl<'a> Unpack<'a> for HttpRequest
source§fn unpack(src: &'a [u8], pos: &mut u32) -> Result<Self>
fn unpack(src: &'a [u8], pos: &mut u32) -> Result<Self>
Convert from fracpack format. Also verifies the integrity of the data. Read more
source§fn verify(src: &'a [u8], pos: &mut u32) -> Result<()>
fn verify(src: &'a [u8], pos: &mut u32) -> Result<()>
Verify the integrity of fracpack data. You don’t need to call this if
using [Pack::unpack] since it verifies integrity during unpack.
impl Eq for HttpRequest
impl StructuralPartialEq for HttpRequest
Auto Trait Implementations§
impl Freeze for HttpRequest
impl RefUnwindSafe for HttpRequest
impl Send for HttpRequest
impl Sync for HttpRequest
impl Unpin for HttpRequest
impl UnwindSafe for HttpRequest
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
source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.