You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
By default, the first matching version is used when no Accept header is
100
-
supplied. This behavior is similar to routing in Rails.
101
-
To circumvent this default behaviour, one could use the `:strict` option. When
102
-
this option is set to `true`, a `404 Not found` error is returned when no
103
-
correct Accept header is supplied.
111
+
supplied. This behavior is similar to routing in Rails. To circumvent this default behavior,
112
+
one could use the `:strict` option. When this option is set to `true`, a `404 Not found` error
113
+
is returned when no correct Accept header is supplied.
104
114
105
115
Serialization takes place automatically. For more detailed usage information,
106
116
please visit the [Grape Wiki](http://github.com/intridea/grape/wiki).
@@ -211,7 +221,9 @@ end
211
221
212
222
## Content-Types
213
223
214
-
By default, Grape supports _XML_, _JSON_, _Atom_, _RSS_, and _text_ content-types. Your API can declare additional types to support. Response format is determined by the request's extension or `Accept` header.
224
+
By default, Grape supports _XML_, _JSON_, _Atom_, _RSS_, and _text_ content-types.
225
+
Your API can declare additional types to support. Response format is determined by the
226
+
request's extension or `Accept` header.
215
227
216
228
```ruby
217
229
classTwitter::API < Grape::API
@@ -329,7 +341,7 @@ This will match all paths starting with '/urls/'. There is one caveat though:
329
341
the `params[:url]` parameter only holds the first part of the request url.
330
342
Luckily this can be circumvented by using the described above syntax for path
331
343
specification and using the `PATH_INFO` Rack environment variable, using
332
-
`env["PATH_INFO"]`. This will hold everyting that comes after the '/urls/'
344
+
`env["PATH_INFO"]`. This will hold everything that comes after the '/urls/'
0 commit comments