org.apache.commons.httpclient.methods

Class PutMethod

Implemented Interfaces:
HttpMethod

public class PutMethod
extends EntityEnclosingMethod

Implements the HTTP PUT method.

The HTTP PUT method is defined in section 9.6 of RFC2616:

The PUT method requests that the enclosed entity be stored under the supplied Request-URI. If the Request-URI refers to an already existing resource, the enclosed entity SHOULD be considered as a modified version of the one residing on the origin server.
Version:
$Revision: 155418 $
Authors:
Remy Maucherat
Mike Bowler
Oleg Kalnichevski
Jeff Dever
Since:
1.0

Field Summary

Fields inherited from class org.apache.commons.httpclient.methods.EntityEnclosingMethod

CONTENT_LENGTH_AUTO, CONTENT_LENGTH_CHUNKED

Constructor Summary

PutMethod()
No-arg constructor.
PutMethod(String uri)
Constructor specifying a URI.

Method Summary

String
getName()
Return "PUT".

Methods inherited from class org.apache.commons.httpclient.methods.EntityEnclosingMethod

addContentLengthRequestHeader, addRequestHeaders, clearRequestBody, generateRequestBody, generateRequestEntity, getFollowRedirects, getRequestCharSet, getRequestContentLength, getRequestEntity, hasRequestContent, recycle, setContentChunked, setFollowRedirects, setRequestBody, setRequestBody, setRequestContentLength, setRequestContentLength, setRequestEntity, writeRequestBody

Methods inherited from class org.apache.commons.httpclient.methods.ExpectContinueMethod

addRequestHeaders, getUseExpectHeader, hasRequestContent, setUseExpectHeader

Methods inherited from class org.apache.commons.httpclient.HttpMethodBase

abort, addCookieRequestHeader, addHostRequestHeader, addProxyConnectionHeader, addRequestHeader, addRequestHeader, addRequestHeaders, addResponseFooter, addUserAgentRequestHeader, checkNotUsed, checkUsed, execute, generateRequestLine, getAuthenticationRealm, getContentCharSet, getDoAuthentication, getEffectiveVersion, getFollowRedirects, getHostAuthState, getHostConfiguration, getMethodRetryHandler, getName, getParams, getPath, getProxyAuthState, getProxyAuthenticationRealm, getQueryString, getRecoverableExceptionCount, getRequestCharSet, getRequestHeader, getRequestHeaderGroup, getRequestHeaders, getRequestHeaders, getResponseBody, getResponseBodyAsStream, getResponseBodyAsString, getResponseCharSet, getResponseContentLength, getResponseFooter, getResponseFooters, getResponseHeader, getResponseHeaderGroup, getResponseHeaders, getResponseHeaders, getResponseStream, getResponseTrailerHeaderGroup, getStatusCode, getStatusLine, getStatusText, getURI, hasBeenUsed, isAborted, isConnectionCloseForced, isHttp11, isRequestSent, isStrictMode, processResponseBody, processResponseHeaders, processStatusLine, readResponse, readResponseBody, readResponseHeaders, readStatusLine, recycle, releaseConnection, removeRequestHeader, removeRequestHeader, responseBodyConsumed, setConnectionCloseForced, setDoAuthentication, setFollowRedirects, setHostConfiguration, setHttp11, setMethodRetryHandler, setParams, setPath, setQueryString, setQueryString, setRequestHeader, setRequestHeader, setResponseStream, setStrictMode, setURI, shouldCloseConnection, validate, writeRequest, writeRequestBody, writeRequestHeaders, writeRequestLine

Constructor Details

PutMethod

public PutMethod()
No-arg constructor.
Since:
1.0

PutMethod

public PutMethod(String uri)
Constructor specifying a URI.
Parameters:
uri - either an absolute or relative URI
Since:
1.0

Method Details

getName

public String getName()
Return "PUT".
Specified by:
getName in interface HttpMethod
Overrides:
getName in interface HttpMethodBase
Returns:
"PUT"
Since:
2.0

Copyright (c) 1999-2005 - Apache Software Foundation