Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## 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.

Inner classes inherited from class com.meterware.httpunit.MessageBodyWebRequest
`MessageBodyWebRequest.InputStreamMessageBody`

Constructor Summary
`PostMethodWebRequest(String urlString)` Constructs a web request using a specific absolute url string.
`PostMethodWebRequest(String urlString, InputStream source, String contentType)` Constructs a web request using a specific absolute url string and input stream.
`PostMethodWebRequest(URL urlBase, String urlString, String target)` Constructs a web request with a specific target.

Method Summary
`protected MessageBody` | `getMessageBody()` Subclasses must override this method to provide a message body for the request.
`String` | `getMethod()` Returns the HTTP method defined for this request.
`String` | `getQueryString()` Returns the query string defined for this request.
`protected boolean` | `maySelectFile(String parameterName)` Returns true if selectFile may be called with this parameter.
`void` | `setMimeEncoded(boolean mimeEncoded)` Selects whether MIME-encoding will be used for this request.

Methods inherited from class com.meterware.httpunit.MessageBodyWebRequest
`completeRequest, getContentType, writeMessageBody`

Methods inherited from class com.meterware.httpunit.WebRequest
`getCharacterSet, getHeaders, getParameter, getParameterHolder, getParameterNames, getParameterValues, getRequestParameterNames, getTarget, getURL, getURLBase, getURLString, isFileParameter, isMimeEncoded, removeParameter, selectFile, selectFile, selectFile, setHeaderField, setImageButtonClickPosition, setParameter, setParameter, setParameter, toString`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

Constructor Detail

### PostMethodWebRequest

    public PostMethodWebRequest(String urlString)

  Constructs a web request using a specific absolute url string.

### PostMethodWebRequest

    public PostMethodWebRequest(String urlString,
                                InputStream source,
                                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 issued
    `source` - an input stream which will provide the body of this request
    `contentType` - the MIME content type of the body, including any character set

### PostMethodWebRequest

    public PostMethodWebRequest(URL urlBase,
                                String urlString,
                                String target)

  Constructs a web request with a specific target.

Method Detail

### setMimeEncoded

    public void setMimeEncoded(boolean mimeEncoded)

  Selects whether MIME-encoding will be used for this request. MIME-encoding changes the way the request is sent and is required for requests which include file parameters. This method may only be called for a request which was not created from a form.
  Overrides:
    `setMimeEncoded` in class `WebRequest`

### getMethod

    public String getMethod()

  Returns the HTTP method defined for this request.
  Overrides:
    `getMethod` in class `WebRequest`

### getQueryString

    public String getQueryString()

  Returns the query string defined for this request.
  Overrides:
    `getQueryString` in class `WebRequest`

### maySelectFile

    protected boolean maySelectFile(String parameterName)

  Returns true if selectFile may be called with this parameter.
  Overrides:
    `maySelectFile` in class `WebRequest`

### getMessageBody

    protected MessageBody getMessageBody()

  Description copied from class: `MessageBodyWebRequest`
  Subclasses must override this method to provide a message body for the request.
  Overrides:
    `getMessageBody` in class `MessageBodyWebRequest`

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD