0

I am new to programming with Rails API. To test my Rails API, I need to build a manual POST request with data format like

{ "user": { "email": "abc@gmail.com", "name": "abc", } }

I am trying to use Simple REST Client but not able to get the URL with data in the above format. How do I write the URL to get the data in the right format?

lokesh
  • 47
  • 7
  • Refer this link for the post request [API][1] [1]: http://stackoverflow.com/questions/5658510/curl-json-post-request-via-terminal-to-a-rails-app – Pulkit Agarwal Oct 18 '14 at 15:28
  • can you give more details ? what are you using to test your API ? if you are using RSpec you could test the a post action to create a new user with this: `post :create, user: {email: "abc@gmail.com", name: "abc"}` – Alireza Oct 18 '14 at 15:31

0 Answers0