Package com.iizix.ws.engine
Interface IRequestContent
- All Known Implementing Classes:
URLEncodedContent
public interface IRequestContent
The request content interface used to format the request appropriately depending on what is being sent.
- Author:
- Christopher Mindus
Field Summary
Modifier and TypeFieldDescriptionstatic final String
The String: "Accept".static final String
The String: "Accept-Charset".static final String
The String: "Accept-Encoding".static final String
The String: "Content-Length".static final String
The String: "Content-Type".static final String
The String: "X-HTTP-Method-Override".Method Summary
Modifier and TypeMethodDescriptionvoid
onPostProcessRequest
(RESTfulRequest request, boolean doPerform) Post-processes the request as required, typically to modify the URLConnection, called before the "connect" method is called for URLConnection.void
onPreProcessRequest
(RESTfulRequest request, boolean doPerform) Pre-processes the request as required, i.e.
Field Details
ACCEPT
The String: "Accept".- See Also:
ACCEPT_CHARSET
The String: "Accept-Charset".- See Also:
ACCEPT_ENCODING
The String: "Accept-Encoding".- See Also:
CONTENT_TYPE
The String: "Content-Type".- See Also:
CONTENT_LENGTH
The String: "Content-Length".- See Also:
X_HTTP_METHOD_OVERRIDE
The String: "X-HTTP-Method-Override".- See Also:
Method Details
onPreProcessRequest
void onPreProcessRequest(RESTfulRequest request, boolean doPerform) throws PropException, UnsupportedEncodingException, URISyntaxException 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.
- Parameters:
request
- The request.doPerform
- Flag to perform the transaction or false to test validity.- Throws:
PropException
- For property errors.UnsupportedEncodingException
- For unsupported encodings.URISyntaxException
- For URI syntax errors for parameters.UnsupportedEncodingException
- For unsupported encodings.
onPostProcessRequest
void onPostProcessRequest(RESTfulRequest request, boolean doPerform) throws PropException, IOException, UnsupportedEncodingException Post-processes the request as required, typically to modify the URLConnection, called before the "connect" method is called for URLConnection.- 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.