ruby-grape / ruby-grape/grape

Access headers in middlewares

Open
#1,554 6 comments 4 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug?
Dominant language
Ruby
Stars
10k
Forks
1.2k
Avg merge
14h 38m
Merged PRs (30d)
92

Description

Hi,

I am new to Grape and I have read the docs and README, but I can't figure out how to access headers in the before method.

I have a class Grape::Middleware::Base with a method before and I didn't find how to access the incoming headers...

Thank in advance !

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with Grape::Middleware::Base and its before method, then read the middleware documentation and existing middleware tests if available. Determine whether incoming headers are currently exposed there and define a documented, tested way to access them; done means the behavior is clear and covered by a test.

Written by the indexing model from the issue text.

Assessment

Tech stack
ruby
Domain
api, backend
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.