Struct thruster::builtins::basic_hyper_context::BasicHyperContext[][src]

pub struct BasicHyperContext {
    pub body: String,
    pub query_params: HashMap<String, String>,
    pub request: Request<Body>,
    pub status: u16,
    pub headers: HashMap<String, String>,
}

Fields

Methods

impl BasicHyperContext
[src]

Get a a parameter

Set a header on the response

Remove a header on the response

Set the response status code

Set the response Content-Type. A shortcode for

This example is not tested
ctx.set("Content-Type", "some-val");

Set up a redirect, will default to 302, but can be changed after the fact.

This example is not tested
ctx.set("Location", "/some-path");
ctx.status(302);

Sets a cookie on the response

Trait Implementations

Auto Trait Implementations