Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- request.accept = "application/json"
- get '/my/path'
- get '/my/path.json'
- get '/my/path', nil, {'HTTP_ACCEPT' => "application/json"}
- @request.env['HTTP_ACCEPT'] = "*/*, application/youtube-client"
- get :index
- header 'X_YOUR_HEADER_VAR', 'val'
- get '/path'
- get :index, :format => 'json'
- request.headers["Accept"] = "application/json"
- {"Accept" => "application/json"}
- headers = { "HTTP_ACCEPT": "application/json" }
- get my_path, xhr: true, headers: my_headers
- post :save, {format: :json, application: {param1: "test", param2: "test"}}
Add Comment
Please, Sign In to add comment