AngularJS POSTs empty requests?
问题 I'm a newbie in AngularJS and I've faced an issue when I try to make a POST request with AngularJS and it POSTs no parameters with it. I use Sinatra as a RESTful interface. That's how my Sinatra backend looks: post '/layer/:layer_id' do @layer = PageLayer.where(id: params[:layer_id]).first @layer.content = params[:content] @layer.save end If try to POST with Postman chrome extension - it works! Sinatra saves the content properly. So I'm sure that the backend works as it should. That's how my