Homepage

HTTPRequestContext

Last edit: Oct 26, 2022

No description

type HTTPRequestContext {
  authentication_providers: [AuthenticationProvider]
  body: String
  current_full_path: String!
  current_path: String!
  current_url: String!
  flash: FlashMessages
  form_authenticity_token: String!
  headers: HeadersObject!
  is_xhr: Boolean
  params: ParamsObject!
  params_unfiltered: HashObject!
  referer: String
}

Fields

authentication_providers (AuthenticationProvider)

Returns array of configured authentication providers

body (String)

current_full_path (String)

Returns a String with the last requested path including their params. /foo?bar

current_path (String)

current_url (String)

Returns the original request URL as a String. # => "http://www.example.com/articles?page=2"

flash (FlashMessages)

form_authenticity_token (String)

headers (HeadersObject)

Access request headers

is_xhr (Boolean)

Returns true if the “X-Requested-With” header contains “XMLHttpRequest”
(case-insensitive),which may need to be manually added depending on the choice
of JavaScript libraries and frameworks.

params (ParamsObject)

Access data sent in by the user or other parameters in your controller actions

params_unfiltered (HashObject)

referer (String)

The referer of the client

Questions?

We are always happy to help with any questions you may have.

contact us