We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents d9c33bb + fcb7c6f commit 0a0f7e4Copy full SHA for 0a0f7e4
README.md
@@ -321,6 +321,19 @@ class Twitter::API < Grape::API
321
end
322
```
323
324
+Keep in mind such declarations as `before/after/rescue_from` must be placed before `mount` in a case where they should be inherited.
325
+
326
+```ruby
327
+class Twitter::API < Grape::API
328
+ before do
329
+ header 'X-Base-Header', 'will be defined for all APIs that are mounted below'
330
+ end
331
332
+ mount Twitter::Users
333
+ mount Twitter::Search
334
+end
335
+```
336
337
## Versioning
338
339
There are four strategies in which clients can reach your API's endpoints: `:path`,
0 commit comments