Function warp::reply::with_header [−][src]
pub fn with_header<T: Reply, K, V>(reply: T, name: K, value: V) -> WithHeader<T> where
HeaderName: HttpTryFrom<K>,
HeaderValue: HttpTryFrom<V>,
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") });