Sha256: e0d20227de20da61a68f7e0e7432497538f45c275e2328eb556378480082488c
Contents?: true
Size: 696 Bytes
Versions: 6
Compression:
Stored size: 696 Bytes
Contents
module Authograph::Adapters class Rack < Base def initialize(_request) @request = _request end def get_header(_header) @request.env[normalize_header(_header)] end def set_header(_header, _value) @request.env[normalize_header(_header)] = _value end def method @request.request_method.upcase end def path @request.fullpath end def content_type @request.content_type end def body return '' unless @request.body data = @request.body.read @request.body.rewind data end private def normalize_header(_header) 'HTTP_' + _header.underscore.upcase end end end
Version data entries
6 entries across 6 versions & 1 rubygems