I’v been trying to make my website work with rest, but i find it a little bit tricky. I followed this tutorial:
http://www.suryasuravarapu.com/2009/06/rest-crud-with-grails.html
And i managed to do the ‘customer’ and ‘customer/1’ get request in the WizTools RestClient. However, the ‘update’, ‘create’ and ‘delete’ part i didnt, meaning ‘put’, ‘post’ and ‘delete’. My question is:
- How can i try this three methods, what do i need to do (folowwing the example)?
Thanks in advanced,
Richard
If you are asking how you can test these methods, you can use any REST client. If you have Chromium (or Google Chrome), Advanced REST client is a good one. Mozilla Firefox equivalent is Poster. In the tutorial you are pointing, a standalone REST client (written in Java) is suggested.
Once you have started one of these clients, you should be able to send requests using PUT, POST, DELETE, or even one of the other, less common HTTP methods. Just put the XML in the body part of your REST client, set a header called
Content-Typetotext/xmland send the request (by clicking on the green arrows on the right of the address bar).