Package org.apache.struts2.rest.handler
Class FormUrlEncodedHandler
java.lang.Object
org.apache.struts2.rest.handler.FormUrlEncodedHandler
- All Implemented Interfaces:
ContentTypeHandler
Handles the default content type for requests that originate from a browser's HTML form
content-type: application/x-www-form-urlencoded
This handler is intended for requests only, not for responses
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfromObject
(ActionInvocation invocation, Object obj, String resultCode, Writer out) Gets the content type for this handlerGets the extension this handler supportsvoid
toObject
(ActionInvocation invocation, Reader in, Object target) No transformation is required as the framework handles this data
-
Field Details
-
CONTENT_TYPE
- See Also:
-
-
Constructor Details
-
FormUrlEncodedHandler
public FormUrlEncodedHandler()
-
-
Method Details
-
fromObject
public String fromObject(ActionInvocation invocation, Object obj, String resultCode, Writer out) throws IOException - Specified by:
fromObject
in interfaceContentTypeHandler
- Throws:
IOException
-
toObject
No transformation is required as the framework handles this data- Specified by:
toObject
in interfaceContentTypeHandler
- Parameters:
in
- The input stream, usually the body of the requesttarget
- The target, usually the action class
-
getExtension
Description copied from interface:ContentTypeHandler
Gets the extension this handler supports- Specified by:
getExtension
in interfaceContentTypeHandler
- Returns:
- The extension is not used by this handler
-
getContentType
Description copied from interface:ContentTypeHandler
Gets the content type for this handler- Specified by:
getContentType
in interfaceContentTypeHandler
- Returns:
- The mime type
-