pub fn append_http_header(&self, name: impl IntoHeaderName, value: impl Into<String>) -> bool {
        self.query_env
            .http_headers
            .lock()
            .unwrap()
            .append(name, value.into())
    }
/// Sets a HTTP header to response.
///
/// If the header was not currently set on the response, then `false` is returned.
///
/// If the response did have this header then the new value is appended to the end of the
/// list of values currently associated with the key, however the key is not updated
/// _(which is important for types that can be `==` without being identical)_.
///
/// See [`http::HeaderMap`] for more details on the underlying implementation
///
/// # Examples
///
/// ```no_run
/// use async_graphql::*;
/// use ::http::header::SET_COOKIE;
///
/// struct Query;
///
/// #[Object]
/// impl Query {
///     async fn greet(&self, ctx: &Context<'_>) -> String {
///         // Insert the first instance of the header
///         ctx.insert_http_header(SET_COOKIE, "Chocolate Chip");
///
///         // Subsequent values should be appended
///         let header_already_exists = ctx.append_http_header("Set-Cookie", "Macadamia");
///         assert!(header_already_exists);
///
///         String::from("Hello world")
///     }
/// }
/// ```
Sets a HTTP header to response.
If the header was not currently set on the response, then `false` is returned.

If the response did have this header then the new value is appended to the end of the
list of values currently associated with the key, however the key is not updated
_(which is important for types that can be `==` without being identical)_.

See [`http::HeaderMap`] for more details on the underlying implementation
Sets a HTTP header to response . If the header was not currently set on the response then ` false ` is returned . If the response did have this header then the new value is appended to the end of the list of values currently associated with the key however the key is not updated _ ( which is important for types that can be ` == ` without being identical ) _ . See [ ` http :: HeaderMap ` ] for more details on the underlying implementation
pub fn append_http_header(&self, name: impl IntoHeaderName, value: impl Into<String>) -> bool {
        self.query_env
            .http_headers
            .lock()
            .unwrap()
            .append(name, value.into())
    }
pub fn append_http_header ( & self , name : impl IntoHeaderName , value : impl Into < String > ) -> bool { self . query_env . http_headers . lock ( ) . unwrap ( ) . append ( name , value . into ( ) ) }
Sets a HTTP header to response.
Sets a HTTP header to response .
&self
name
impl IntoHeaderName
value
impl Into<String>
&self
name
impl IntoHeaderName
value
impl Into<String>
examples
```no_run
use async_graphql::*;
use ::http::header::SET_COOKIE.

struct Query.
` ` ` no_run use async_graphql :: * ; use :: http :: header :: SET_COOKIE . struct Query .
[object]
impl Query {
async fn greet(&self, ctx: &Context<'_>) -> String {
Insert the first instance of the header
ctx.insert_http_header(SET_COOKIE, "Chocolate Chip").

Subsequent values should be appended
let header_already_exists = ctx.append_http_header("Set-Cookie", "Macadamia");
assert!(header_already_exists).


impl Query { async fn greet ( &self ctx : &Context< ' _ > ) - > String { Insert the first instance of the header ctx . insert_http_header ( SET_COOKIE " Chocolate Chip " ) . Subsequent values should be appended let header_already_exists = ctx . append_http_header ( " Set - Cookie " " Macadamia " ) ; assert! ( header_already_exists ) .