org.codegist.crest
Class DefaultRestService
java.lang.Object
org.codegist.crest.DefaultRestService
- All Implemented Interfaces:
- RestService
public class DefaultRestService
- extends Object
- implements RestService
Simple RestService implementation based on JDK's HttpURLConnection
.
- Author:
- Laurent Gilles (laurent.gilles@codegist.org)
- See Also:
HttpURLConnection
DefaultRestService
public DefaultRestService()
exec
public HttpResponse exec(HttpRequest request)
throws HttpException
- Description copied from interface:
RestService
- Execute the given request.
- Specified by:
exec
in interface RestService
- Parameters:
request
- Request to fire
- Returns:
- The response.
- Throws:
HttpException
- For any problem occuring during the http transaction, and when response status code is not HTTP OK 200
Copyright © 2011. All Rights Reserved.