title: Empty params on POST request to a Rails 4 API
body: <p>I just started coding in Rails in order to create an API an I've already hit a wall. I'm trying to create a user using a POST request. Here's my users controller which was created using the scaffold command:</p>
  
  <pre><code>def create
  @user = User.new(params[:user])
  
  logger.info(@user.to_json)
  
  if @user.save
   render json: @user, status: :created, location: @user
  
  else
    render json: @user.errors, status: :unprocessable_entity
  end
  </code></pre>
  
  <p>end</p>
  
  <p>The user model only has one validation <code>validates :name, presence: true</code> and that keeps failing because apparently the params is always empty. To test the calls I'm using Postman - REST Client on Chrome and the URL I'm hitting is <code>http://localhost:3000/users</code> . I'm not sure what is it that I'm doing terribly wrong. The same setup with the form and http works fine.</p>
  
  <p>I tried formatting the JSON object in different ways but nothing works. So far I've used:</p>
  
  <ol>
  <li>{"user":{"name":"test"}}</li>
  <li>{{"name":"test"}}</li>
  </ol>