开发者

How to set a RESTful call?

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, coo开发者_如何学JAVAkies?http header? Can anyone help me? Thank you.


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.


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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜