PutMethod (HttpClient Library (Version 3.1))
Date: 2019-01-01

org.apache.commons.httpclient.methods

## Class PutMethod

- java.lang.Object
- - org.apache.commons.httpclient.HttpMethodBase
  - - org.apache.commons.httpclient.methods.ExpectContinueMethod
    - - org.apache.commons.httpclient.methods.EntityEnclosingMethod
      - - org.apache.commons.httpclient.methods.PutMethod

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

  Since:
    1.0
  Version:
    $Revision: 480424 $
  Author:
    Remy Maucherat, Mike Bowler, Oleg Kalnichevski, Jeff Dever

- - ### Field Summary

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

      `CONTENT_LENGTH_AUTO, CONTENT_LENGTH_CHUNKED`

    - ### Fields inherited from class org.apache.commons.httpclient.HttpMethodBase

      `effectiveVersion, statusLine`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `PutMethod()` No-arg constructor.
    `PutMethod(java.lang.String uri)` Constructor specifying a URI.

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `java.lang.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

      `getUseExpectHeader, setUseExpectHeader`

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

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

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### PutMethod

          public PutMethod()

      No-arg constructor.
      Since:
        1.0

    - #### PutMethod

          public PutMethod(java.lang.String uri)

      Constructor specifying a URI.
      Parameters:
        `uri` - either an absolute or relative URI
      Since:
        1.0

  - ### Method Detail

    - #### getName

          public java.lang.String getName()

      Return `"PUT"`.
      Specified by:
        `getName` in interface `HttpMethod`
      Specified by:
        `getName` in class `HttpMethodBase`
      Returns:
        `"PUT"`
      Since:
        2.0

Copyright (c) 1999-2005 - Apache Software Foundation