We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
In short, you need to set the header and set raw_post to json.
resource "Order" do header "Content-Type", "application/json" post "/orders" do parameter :name, "Order name" let(:name) { "New order" } let(:raw_post) { params.to_json } example "Sending JSON" do do_request response_body.should be_json_eql({ :name => name }.to_json) status.should == 201 end end end