Struct gloo_net::http::ResponseBuilder
source · pub struct ResponseBuilder { /* private fields */ }
Available on crate feature
http
only.Expand description
A writable wrapper around web_sys::Reponse
: an http response to be used with the fetch
API
on a server side javascript runtime
Implementations§
source§impl ResponseBuilder
impl ResponseBuilder
sourcepub fn new() -> Self
pub fn new() -> Self
Creates a new response object which defaults to status 200 for other status codes, call Self.status(400)
sourcepub fn status_text(self, status_text: &str) -> Self
pub fn status_text(self, status_text: &str) -> Self
Set the status text
Trait Implementations§
source§impl Debug for ResponseBuilder
impl Debug for ResponseBuilder
Auto Trait Implementations§
impl Freeze for ResponseBuilder
impl RefUnwindSafe for ResponseBuilder
impl !Send for ResponseBuilder
impl !Sync for ResponseBuilder
impl Unpin for ResponseBuilder
impl UnwindSafe for ResponseBuilder
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