com.meterware.httpunit
Class PutMethodWebRequest

java.lang.Object
  |
  +--com.meterware.httpunit.WebRequest
        |
        +--com.meterware.httpunit.MessageBodyWebRequest
              |
              +--com.meterware.httpunit.PutMethodWebRequest

public class PutMethodWebRequest
extends MessageBodyWebRequest

A web request using the PUT protocol. The objectives of this class are to suport an HTTP PUT petition so we can test this HTTP requests. Documentation See the HTTP 1.1 [spec]

Author:
Tom Watkins, Deepa Dihr, Marcos Tarruella, Russell Gold

Inner classes inherited from class com.meterware.httpunit.MessageBodyWebRequest
MessageBodyWebRequest.InputStreamMessageBody
 
Constructor Summary
PutMethodWebRequest(String url, InputStream source, String contentType)
          Constructs a web request using a specific absolute url string and input stream.
 
Method Summary
protected  MessageBody getMessageBody()
          Returns a message body based on the input stream.
 String getMethod()
          Returns 'PUT' to indicate the method.
 
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, getQueryString, getRequestParameterNames, getTarget, getURL, getURLBase, getURLString, isFileParameter, isMimeEncoded, maySelectFile, removeParameter, selectFile, selectFile, selectFile, setHeaderField, setImageButtonClickPosition, setMimeEncoded, setParameter, setParameter, setParameter, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

PutMethodWebRequest

public PutMethodWebRequest(String url,
                           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
Method Detail

getMethod

public String getMethod()
Returns 'PUT' to indicate the method.
Overrides:
getMethod in class WebRequest

getMessageBody

protected MessageBody getMessageBody()
Returns a message body based on the input stream.
Overrides:
getMessageBody in class MessageBodyWebRequest