title: Making basic requests in JS to my Rails API from Chrome Extension
body: <p>I'm writing a Chrome extension which I want to talk to my Rails API.</p>
  
  <p>A <code>user</code> has an <code>email</code> and <code>password</code> to it.</p>
  
  <p>Right now my <code>users_controller</code> looks like this:</p>
  
  <pre><code>  def create
      @user = User.new(params[:user])
  
      if @user.save
        render json: @user, status: :created, location: @user
      else
        render json: @user.errors, status: :unprocessable_entity
      end
    end
  </code></pre>
  
  <p>And in the Chrome console, I'm testing some create actions like</p>
  
  <p><code>$.post('http://localhost:3000/users', "me@example.com");</code></p>
  
  <p>Which return:</p>
  
  <pre><code>{
  user: {
  created_at: "2013-04-27T18:11:57Z",
  email: null,
  id: 2,
  password: null,
  updated_at: "2013-04-27T18:11:57Z"
  }
  }
  </code></pre>
  
  <p>Any suggestions on how to hit my API and create a new user? </p>
  
  <p>Thanks!</p>