HTTP POST request sent via curl against REST server looses JSON parameters
问题 I created a REST server with Rails that manages Users and associated Comments . Here is the routes configuration. resources :users do resources :comments end In the controller I only need actions to query and create Comments . The exchange format is JSON. class CommentsController < ApplicationController def index @user = User.find(params[:user_id]) @comments = @user.comments respond_to do |format| format.html # index.html.erb format.json { render json: @comments } end end def create @user =