I\'m using the rails-api gem to build a web service and want to test my API with RSpec. Every request I make, regardless of the HTTP method has the CONTENT_TYPE hea
CONTENT_TYPE
Rails 5
headers = { 'CONTENT_TYPE' => 'application/json' } params = { user_type: 'tester' }
and after that request like
post '/api/v1/users/test', params.to_json, headers
and also remove .to_json from request route
.to_json