wood burning stoves 2.0*
The moose likes Web Services and the fly likes Can HTTP POST be used for a RESTful service? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Web Services
Bookmark "Can HTTP POST be used for a RESTful service?" Watch "Can HTTP POST be used for a RESTful service?" New topic
Author

Can HTTP POST be used for a RESTful service?

Dan Drillich
Ranch Hand

Joined: Jul 09, 2001
Posts: 1167
Good Day,

I see a web service that uses HTTP POST with XML documents for requests and responses. The documentation of this web service refers to it as a RESTful service. Is it right? Because I was under the impression that RESTful services can only use HTTP GETs...

Regards,
Dan

William Butler Yeats: All life is a preparation for something that probably will never happen. Unless you make it happen.
Paul Clapham
Bartender

Joined: Oct 14, 2005
Posts: 18541
    
    8

It could be right... check out this table in the Wikipedia article at http://en.wikipedia.org/wiki/Representational_state_transfer#RESTful_web_services to see what a POST method is supposed to be able to do.

I'm not saying that your web service is in fact using POST correctly, only that it's possible to use POST in a RESTful web service.
Dan Drillich
Ranch Hand

Joined: Jul 09, 2001
Posts: 1167
Thank you Paul.
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 60774
    
  65

Dan Drillich wrote:Because I was under the impression that RESTful services can only use HTTP GETs...

Nope, the full range of HTTP methods can be used. I wonder where that impression came from?


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Can HTTP POST be used for a RESTful service?
 
Similar Threads
REST Fileupload client
Exposing Methods as RESTFul Services
Difference between servlet and restful webservice
JAX-WS - WSDLS - Where are they?
Dynamically generation of JSP/HTML file