pub struct FetchResponse {
pub status: u16,
pub headers: HashMap<String, String>,
pub body: String,
}Expand description
Successful response from fetch.
Fields§
§status: u16HTTP status code returned by the upstream.
headers: HashMap<String, String>Response headers (lowercased keys, as the host normalises them).
body: StringResponse body as a UTF-8 string. Binary upstream responses are returned as the lossy UTF-8 conversion of their bytes - fetch a JSON or text endpoint, or have the upstream base64-encode binary data.
Trait Implementations§
Source§impl Debug for FetchResponse
impl Debug for FetchResponse
Source§impl<'de> Deserialize<'de> for FetchResponse
impl<'de> Deserialize<'de> for FetchResponse
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
Auto Trait Implementations§
impl Freeze for FetchResponse
impl RefUnwindSafe for FetchResponse
impl Send for FetchResponse
impl Sync for FetchResponse
impl Unpin for FetchResponse
impl UnsafeUnpin for FetchResponse
impl UnwindSafe for FetchResponse
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