Function warp::reply::with_header

source ·
pub fn with_header<T: Reply, K, V>(reply: T, name: K, value: V) -> WithHeader<T>
Expand description

Wrap an impl Reply to add a header when rendering.

§Example

use warp::Filter;

let route = warp::any()
    .map(warp::reply)
    .map(|reply| {
        warp::reply::with_header(reply, "server", "warp")
    });