org.codegist.crest
Class DefaultRestService

java.lang.Object
  extended by 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

Constructor Summary
DefaultRestService()
           
 
Method Summary
 HttpResponse exec(HttpRequest request)
          Execute the given request.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultRestService

public DefaultRestService()
Method Detail

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.