Skip to content

Commit aec9444

Browse files
committed
mention #content_types in README
1 parent 56dae8b commit aec9444

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

README.markdown

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -209,6 +209,16 @@ end
209209
end
210210
end
211211

212+
## Content-Types
213+
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.
215+
216+
```ruby
217+
class Twitter::API < Grape::API
218+
content_types :xls => "application/vnd.ms-excel"
219+
end
220+
```
221+
212222
## Writing Tests
213223

214224
You can test a Grape API with RSpec. Tests make HTTP requests, therefore they

0 commit comments

Comments
 (0)