pub fn http_header_contains(&self, key: impl AsHeaderName) -> bool {
        self.query_env
            .http_headers
            .lock()
            .unwrap()
            .contains_key(key)
    }
/// Returns whether the HTTP header `key` is currently set on the response
///
/// # Examples
///
/// ```no_run
/// use async_graphql::*;
/// use ::http::header::ACCESS_CONTROL_ALLOW_ORIGIN;
///
/// struct Query;
///
/// #[Object]
/// impl Query {
///     async fn greet(&self, ctx: &Context<'_>) -> String {
///
///         let header_exists = ctx.http_header_contains("Access-Control-Allow-Origin");
///         assert!(!header_exists);
///
///         ctx.insert_http_header(ACCESS_CONTROL_ALLOW_ORIGIN, "*");
///
///         let header_exists = ctx.http_header_contains("Access-Control-Allow-Origin");
///         assert!(header_exists);
///
///         String::from("Hello world")
///     }
/// }
/// ```
Returns whether the HTTP header `key` is currently set on the response
Returns whether the HTTP header ` key ` is currently set on the response
pub fn http_header_contains(&self, key: impl AsHeaderName) -> bool {
        self.query_env
            .http_headers
            .lock()
            .unwrap()
            .contains_key(key)
    }
pub fn http_header_contains ( & self , key : impl AsHeaderName ) -> bool { self . query_env . http_headers . lock ( ) . unwrap ( ) . contains_key ( key ) }
Returns whether the HTTP header `key` is currently set on the response
Returns whether the HTTP header ` key ` is currently set on the response
&self
key
impl AsHeaderName
&self
key
impl AsHeaderName
examples
```no_run
use async_graphql::*;
use ::http::header::ACCESS_CONTROL_ALLOW_ORIGIN.

struct Query.
` ` ` no_run use async_graphql :: * ; use :: http :: header :: ACCESS_CONTROL_ALLOW_ORIGIN . struct Query .
[object]
impl Query {
async fn greet(&self, ctx: &Context<'_>) -> String {

let header_exists = ctx.http_header_contains("Access-Control-Allow-Origin");
assert!(!header_exists).

ctx.insert_http_header(ACCESS_CONTROL_ALLOW_ORIGIN, "*").

let header_exists = ctx.http_header_contains("Access-Control-Allow-Origin");
assert!(header_exists).


impl Query { async fn greet ( &self ctx : &Context< ' _ > ) - > String { let header_exists = ctx . http_header_contains ( " Access - Control - Allow - Origin " ) ; assert! ( !header_exists ) . ctx . insert_http_header ( ACCESS_CONTROL_ALLOW_ORIGIN " * " ) . let header_exists = ctx . http_header_contains ( " Access - Control - Allow - Origin " ) ; assert! ( header_exists ) .