Class: Nimbu::Request::UserAgent
- Inherits:
-
Faraday::Middleware
- Object
- Faraday::Middleware
- Nimbu::Request::UserAgent
- Includes:
- Utils::Constants
- Defined in:
- lib/nimbu-api/request/user_agent.rb
Constant Summary
Constants included from Utils::Constants
Utils::Constants::ACCEPT, Utils::Constants::ACCEPTED_OAUTH_SCOPES, Utils::Constants::ACCEPT_CHARSET, Utils::Constants::CACHE_CONTROL, Utils::Constants::CONTENT_LENGTH, Utils::Constants::CONTENT_TYPE, Utils::Constants::DATE, Utils::Constants::ETAG, Utils::Constants::HEADER_LAST, Utils::Constants::HEADER_LINK, Utils::Constants::HEADER_NEXT, Utils::Constants::LOCATION, Utils::Constants::META_FIRST, Utils::Constants::META_LAST, Utils::Constants::META_NEXT, Utils::Constants::META_PREV, Utils::Constants::META_REL, Utils::Constants::NIMBU_SITE, Utils::Constants::OAUTH_SCOPES, Utils::Constants::PARAM_PAGE, Utils::Constants::PARAM_PER_PAGE, Utils::Constants::PARAM_START_PAGE, Utils::Constants::RATELIMIT_LIMIT, Utils::Constants::RATELIMIT_REMAINING, Utils::Constants::SERVER, Utils::Constants::USER_AGENT
Instance Method Summary collapse
Instance Method Details
#call(env) ⇒ Object
9 10 11 12 13 |
# File 'lib/nimbu-api/request/user_agent.rb', line 9 def call(env) env[:request_headers].merge!(USER_AGENT => Nimbu.user_agent) @app.call env end |