Package com.iizix.ws.engine.url
Class URLEncodedContent
java.lang.Object
com.iizix.ws.engine.url.URLEncodedContent
- All Implemented Interfaces:
IRequestContent
Content being encoded for "application/x-www-form-urlencoded", used by GET and POST methods.
- Author:
- Christopher Mindus
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringThe 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_OVERRIDEConstructor Summary
ConstructorsMethod Summary
Modifier and TypeMethodDescriptionvoidonPostProcessRequest(RESTfulRequest request, boolean doPerform) Pre-processes the request as required, typically to modify the URLConnection.voidonPreProcessRequest(RESTfulRequest request, boolean doPerform) Pre-processes the request as required, i.e.
Field Details
X_WWW_FORM_URLENCODED
The String: "application/x-www-form-urlencoded" for "Content-Type".- See Also:
Constructor Details
URLEncodedContent
Constructor.- Parameters:
inputProp- The URL encoded input.
Method Details
onPreProcessRequest
public void onPreProcessRequest(RESTfulRequest request, boolean doPerform) throws PropException, UnsupportedEncodingException, URISyntaxException, 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:
onPreProcessRequestin interfaceIRequestContent- Parameters:
request- The request.doPerform- Flag to perform the transaction or false to test validity.- Throws:
PropException- For property errors.UnsupportedEncodingException- For encoding errors.URISyntaxException- For URI syntax errors for parameters.UnsupportedEncodingException- For unsupported encodings.
onPostProcessRequest
public void onPostProcessRequest(RESTfulRequest request, boolean doPerform) throws PropException, IOException, UnsupportedEncodingException Pre-processes the request as required, typically to modify the URLConnection.- Specified by:
onPostProcessRequestin interfaceIRequestContent- Parameters:
request- The request.doPerform- Flag to perform the transaction or false to test validity.- Throws:
PropException- For property errors.IOException- For I/O errors.UnsupportedEncodingException- For unsupported encodings.