com.meterware.httpunit

Class 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

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 MessageBodygetMessageBody()
Returns a message body based on the input stream.
StringgetMethod()
Returns 'PUT' to indicate the method.

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

getMessageBody

protected MessageBody getMessageBody()
Returns a message body based on the input stream.

getMethod

public String getMethod()
Returns 'PUT' to indicate the method.