Package com.meterware.httpunit
Class PostMethodWebRequest
- java.lang.Object
-
- com.meterware.httpunit.WebRequest
-
- com.meterware.httpunit.MessageBodyWebRequest
-
- com.meterware.httpunit.PostMethodWebRequest
-
public class PostMethodWebRequest extends MessageBodyWebRequest
An HTTP request using the POST method.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class com.meterware.httpunit.MessageBodyWebRequest
MessageBodyWebRequest.InputStreamMessageBody
-
-
Field Summary
-
Fields inherited from class com.meterware.httpunit.MessageBodyWebRequest
_body
-
Fields inherited from class com.meterware.httpunit.WebRequest
method
-
-
Constructor Summary
Constructors Constructor Description PostMethodWebRequest(java.lang.String urlString)Constructs a web request using a specific absolute url string.PostMethodWebRequest(java.lang.String urlString, boolean mimeEncoded)Constructs a web request using a specific absolute url string, with optional mime encoding.PostMethodWebRequest(java.lang.String urlString, java.io.InputStream source, java.lang.String contentType)Constructs a web request using a specific absolute url string and input stream.PostMethodWebRequest(java.net.URL urlBase, java.lang.String urlString, java.lang.String target)Constructs a web request with a specific target.PostMethodWebRequest(java.net.URL urlBase, java.lang.String urlString, java.lang.String target, boolean mimeEncoded)Constructs a web request with a specific target, with optional mime encoding.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected com.meterware.httpunit.protocol.MessageBodygetMessageBody()Subclasses may override this method to provide a message body for the request.java.lang.StringgetMethod()Returns the HTTP method defined for this request.java.lang.StringgetQueryString()Returns the query string defined for this request.protected booleanmaySelectFile(java.lang.String parameterName)Returns true if selectFile may be called with this parameter.-
Methods inherited from class com.meterware.httpunit.MessageBodyWebRequest
completeRequest, getContentType, isMimeEncoded, writeMessageBody
-
Methods inherited from class com.meterware.httpunit.WebRequest
getCharacterSet, getHeaders, getParameter, getParameterHolder, getParameterValues, getRequestParameterNames, getTarget, getURL, getURLBase, getURLString, isFileParameter, removeParameter, selectFile, selectFile, selectFile, setHeaderField, setImageButtonClickPosition, setParameter, setParameter, setParameter, toString
-
-
-
-
Constructor Detail
-
PostMethodWebRequest
public PostMethodWebRequest(java.lang.String urlString)
Constructs a web request using a specific absolute url string.
-
PostMethodWebRequest
public PostMethodWebRequest(java.lang.String urlString, boolean mimeEncoded)Constructs a web request using a specific absolute url string, with optional mime encoding.
-
PostMethodWebRequest
public PostMethodWebRequest(java.net.URL urlBase, java.lang.String urlString, java.lang.String target)Constructs a web request with a specific target.
-
PostMethodWebRequest
public PostMethodWebRequest(java.net.URL urlBase, java.lang.String urlString, java.lang.String target, boolean mimeEncoded)Constructs a web request with a specific target, with optional mime encoding.
-
PostMethodWebRequest
public PostMethodWebRequest(java.lang.String urlString, java.io.InputStream source, java.lang.String contentType)Constructs a web request using a specific absolute url string and input stream.- Parameters:
urlString- the URL to which the request should be issuedsource- an input stream which will provide the body of this requestcontentType- the MIME content type of the body, including any character set
-
-
Method Detail
-
getMethod
public java.lang.String getMethod()
Returns the HTTP method defined for this request.- Overrides:
getMethodin classWebRequest- Returns:
- the method
-
getQueryString
public java.lang.String getQueryString()
Returns the query string defined for this request.- Overrides:
getQueryStringin classWebRequest
-
maySelectFile
protected boolean maySelectFile(java.lang.String parameterName)
Returns true if selectFile may be called with this parameter.- Overrides:
maySelectFilein classWebRequest
-
getMessageBody
protected com.meterware.httpunit.protocol.MessageBody getMessageBody()
Description copied from class:MessageBodyWebRequestSubclasses may override this method to provide a message body for the request.- Overrides:
getMessageBodyin classMessageBodyWebRequest
-
-