tags:

views:

28

answers:

2

Hi, everyone,

I want to ask a question about the RESTful. I want to click a URL and make a RESTful call. However, I don't know what kind of information do I need to send with the URL, cookies?http header? Can anyone help me? Thank you.

A: 

It's not really possible to make Restfull api calls with a browser. Especially not with links.

With links, you only can make GET requests. To make POST requests, you would have to use a form.

PUT and DELETE aren't even possible at all.

If you are using windows, you can look at HTTP Fiddler 2, which can build arbitrary requests.

Further more, it depends on the API itself what you should send. We cannot help you unless you give some more details about what kind of request you want to make.

Ikke
+1  A: 

If you use jQuery, you can use proper RESTful HTTP requests (PUT/DELETE as well as GET/POST). Have a look at jQuery.ajax() for details.

I'd also suggest you get a bit more familiar with the principles behind REST. The O'Reilly Restful Web Services book is quite a good one for that, although some of the framework specific details are a little out of date.

Matthew Schinckel