Hi,
I am creating a web service in rails application and I need to configure routes with respect to “books/book_id/delete” with post method.
But since I will not have a view page for this to create a book item, for testing purpose I am typing the url in the browser as
localhost:3000/books/book_id/delete
But now when I type the above url in browser it is taking as GET request and showing error msg as
Hi,
I am creating a web service in rails application and I need to configure routes with respect to “books/book_id/delete” with post method.
But since I will not have a view page for this to create a book item, for testing purpose I am typing the url in the browser as
localhost:3000/books/book_id/delete
But now when I type the above url in browser it is taking as GET request and showing error msg as
HTTP POST request cannot be sent via URL.
You need to use some external tool such as cURL or wget.
Hi,
I am creating a web service in rails application and I need to configure routes with respect to “books/book_id/delete” with post method.
But since I will not have a view page for this to create a book item, for testing purpose I am typing the url in the browser as
localhost:3000/books/book_id/delete
But now when I type the above url in browser it is taking as GET request and showing error msg as
The normal automated tests that any Rails app should include will test
it (using rspec for example). If you don't know how to do this then
work right through a good rails tutorial such as railstutorial.org
(which is free to use online), that will show you how to test the
interface. The tutorial mostly focusses on a normal application with
a UI but the testing methods are fundamentally the same for a web
service.