Package com.iizix.ws.engine.url
Class URLEncodedContent
- java.lang.Object
- com.iizix.ws.engine.url.URLEncodedContent
- All Implemented Interfaces:
IRequestContent
public class URLEncodedContent extends java.lang.Object implements IRequestContent
Content being encoded for "application/x-www-form-urlencoded", used by GET and POST methods.- Author:
- Christopher Mindus
Field Summary
Fields Modifier and Type Field Description static java.lang.String
X_WWW_FORM_URLENCODED
The String: "application/x-www-form-urlencoded" for "Content-Type".Fields inherited from interface com.iizix.ws.engine.IRequestContent
ACCEPT, ACCEPT_CHARSET, ACCEPT_ENCODING, CONTENT_LENGTH, CONTENT_TYPE, X_HTTP_METHOD_OVERRIDE
Constructor Summary
Constructors Constructor Description URLEncodedContent(URLEncodedInput inputProp)
Constructor.
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
onPostProcessRequest(RESTfulRequest request, boolean doPerform)
Pre-processes the request as required, typically to modify the URLConnection.void
onPreProcessRequest(RESTfulRequest request, boolean doPerform)
Pre-processes the request as required, i.e.
Field Detail
X_WWW_FORM_URLENCODED
public static final java.lang.String X_WWW_FORM_URLENCODED
The String: "application/x-www-form-urlencoded" for "Content-Type".- See Also:
- Constant Field Values
Constructor Detail
URLEncodedContent
public URLEncodedContent(URLEncodedInput inputProp)
Constructor.- Parameters:
inputProp
- The URL encoded input.
Method Detail
onPreProcessRequest
public void onPreProcessRequest(RESTfulRequest request, boolean doPerform) throws PropException, java.io.UnsupportedEncodingException, java.net.URISyntaxException, java.io.UnsupportedEncodingException
Pre-processes the request as required, i.e. to change the URL to add a Query String for e.g. a GET method.This call is done prior to establishing the URLConnection.
- Specified by:
onPreProcessRequest
in interfaceIRequestContent
- Parameters:
request
- The request.doPerform
- Flag to perform the transaction or false to test validity.- Throws:
PropException
- For property errors.java.io.UnsupportedEncodingException
- For encoding errors.java.net.URISyntaxException
- For URI syntax errors for parameters.java.io.UnsupportedEncodingException
- For unsupported encodings.
onPostProcessRequest
public void onPostProcessRequest(RESTfulRequest request, boolean doPerform) throws PropException, java.io.IOException, java.io.UnsupportedEncodingException
Pre-processes the request as required, typically to modify the URLConnection.- Specified by:
onPostProcessRequest
in interfaceIRequestContent
- Parameters:
request
- The request.doPerform
- Flag to perform the transaction or false to test validity.- Throws:
PropException
- For property errors.java.io.IOException
- For I/O errors.java.io.UnsupportedEncodingException
- For unsupported encodings.