- HTTP_VERSION =
'HTTP_VERSION'
- PATH_INFO =
'PATH_INFO'
- REQUEST_METHOD =
'REQUEST_METHOD'
- QUERY_STRING =
'QUERY_STRING'
- CONTENT_TYPE =
'Content-Type'
- GET =
'GET'
- POST =
'POST'
- PUT =
'PUT'
- PATCH =
'PATCH'
- DELETE =
'DELETE'
- HEAD =
'HEAD'
- OPTIONS =
'OPTIONS'
- SUPPORTED_METHODS =
[GET, POST, PUT, PATCH, DELETE, HEAD, OPTIONS].freeze
- SUPPORTED_METHODS_WITHOUT_OPTIONS =
Grape::Util::LazyObject.new { [GET, POST, PUT, PATCH, DELETE, HEAD].freeze }
- HTTP_ACCEPT_VERSION =
'HTTP_ACCEPT_VERSION'
- X_CASCADE =
'X-Cascade'
- HTTP_TRANSFER_ENCODING =
'HTTP_TRANSFER_ENCODING'
- HTTP_ACCEPT =
'HTTP_ACCEPT'
- FORMAT =
'format'
Grape::Util::LazyObject.new do
= %w[
Version
Host
Connection
Cache-Control
Dnt
Upgrade-Insecure-Requests
User-Agent
Sec-Fetch-Dest
Accept
Sec-Fetch-Site
Sec-Fetch-Mode
Sec-Fetch-User
Accept-Encoding
Accept-Language
Cookie
].freeze
.each_with_object({}) do |, response|
response["HTTP_#{.upcase.tr('-', '_')}"] =
end.freeze
end