com.meterware.httpunit
Class MessageBodyWebRequest
java.lang.Object
|
+--com.meterware.httpunit.WebRequest
|
+--com.meterware.httpunit.MessageBodyWebRequest
- Direct Known Subclasses:
- PostMethodWebRequest, PutMethodWebRequest
- public abstract class MessageBodyWebRequest
- extends WebRequest
A web request which contains a non-empty message body. Note that such requests
must use the http
or https
protocols.
Methods inherited from class com.meterware.httpunit.WebRequest |
getCharacterSet, getHeaders, getMethod, getParameter, getParameterHolder, getParameterNames, getParameterValues, getQueryString, getRequestParameterNames, getTarget, getURL, getURLBase, getURLString, isFileParameter, isMimeEncoded, maySelectFile, removeParameter, selectFile, selectFile, selectFile, setHeaderField, setImageButtonClickPosition, setMimeEncoded, setParameter, setParameter, setParameter, toString |
MessageBodyWebRequest
protected MessageBodyWebRequest(String urlString)
- Constructs a web request using a specific absolute url string.
MessageBodyWebRequest
protected MessageBodyWebRequest(URL urlBase,
String urlString,
String target)
- Constructs a web request with a specific target.
MessageBodyWebRequest
protected MessageBodyWebRequest(WebForm sourceForm,
SubmitButton button,
int x,
int y)
- Constructs a web request for a form.
getMessageBody
protected abstract MessageBody getMessageBody()
- Subclasses must override this method to provide a message body for the
request.
writeMessageBody
protected void writeMessageBody(OutputStream stream)
throws IOException
- Description copied from class:
WebRequest
- Writes the contents of the message body to the specified stream.
- Overrides:
writeMessageBody
in class WebRequest
completeRequest
protected void completeRequest(URLConnection connection)
throws IOException
- Performs any additional processing necessary to complete the request.
- Overrides:
completeRequest
in class WebRequest
getContentType
protected String getContentType()
- Description copied from class:
WebRequest
- Returns the content type of this request. If null, no content is specified.
- Overrides:
getContentType
in class WebRequest