Package org.wicketstuff.restutils.http
Class HttpUtils
- java.lang.Object
-
- org.wicketstuff.restutils.http.HttpUtils
-
public class HttpUtils extends Object
Utility class for HTTP-related operations.- Author:
- andrea del bene
-
-
Constructor Summary
Constructors Constructor Description HttpUtils()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static HttpMethodgetHttpMethod(WebRequest request)Utility method to extract the HTTP request method.static HttpMethodgetHttpMethod(Request request)Utility method to extract the HTTP request method.static StringreadStringFromRequest(WebRequest request)Read the string content of the current request.
-
-
-
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
-
-