org.wicketstuff.rest.utils.http
Class HttpUtils

java.lang.Object
  extended by org.wicketstuff.rest.utils.http.HttpUtils

public class HttpUtils
extends Object

Utility class for HTTP-related operations.

Author:
andrea del bene

Constructor Summary
HttpUtils()
           
 
Method Summary
static HttpMethod getHttpMethod(Request request)
          Utility method to extract the HTTP request method.
static HttpMethod getHttpMethod(WebRequest request)
          Utility method to extract the HTTP request method.
static String readStringFromRequest(WebRequest request)
          Read the string content of the current request.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

HttpUtils

public HttpUtils()
Method Detail

readStringFromRequest

public static String readStringFromRequest(WebRequest request)
                                    throws IOException
Read the string content of the current request.

Parameters:
request - the current request
Returns:
the string inside body request.
Throws:
IOException

getHttpMethod

public static HttpMethod getHttpMethod(Request request)
Utility method to extract the HTTP request method.

Parameters:
request - the current request object
Returns:
the HTTP method used for this request
See Also:
HttpMethod

getHttpMethod

public static HttpMethod getHttpMethod(WebRequest request)
Utility method to extract the HTTP request method.

Parameters:
request - the current request object
Returns:
the HTTP method used for this request
See Also:
HttpMethod


Copyright © 2013–2014. All rights reserved.