Class MkcolMethod
- All Implemented Interfaces:
org.apache.commons.httpclient.HttpMethod
This implementation of a MKCOL client method does not support a a request body, and the newly created web collection should therefore have no members.
MKCOL creates a new collection resource at the location specified by
the Request-URI. If the resource identified by the Request-URI already
exists on the server then the MKCOL will fail. During MKCOL processing,
a server will make the Request-URI a member of the URI's parent collection
(unless the Request-URI is "/"). If no parent collection exists, the method
will fail. Thus, for example, if a request to create collection
/a/b/c/d/
is made, and neither /a/b/
nor
/a/b/c/
exists, the request will fail.
MKCOL is not idempotent (that is to say, each MKCOL request should be handled by the web server, and the results of a MKCOL request should not be cached).
Example Request
MKCOL /webdisc/xfiles/ HTTP/1.1 Host: www.server.org
Example Response
HTTP/1.1 201 Created
-
Field Summary
Fields inherited from class org.apache.commons.httpclient.HttpMethodBase
effectiveVersion, statusLine
-
Constructor Summary
Constructors -
Method Summary
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, getParams, getPath, getProxyAuthenticationRealm, getProxyAuthState, getQueryString, getRecoverableExceptionCount, getRequestCharSet, 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, 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
-
MkcolMethod
public MkcolMethod()Method constructor. -
MkcolMethod
Method constructor.
-
-
Method Details
-
parseResponse
Parse the response body. The MKCOL method does not receive a response body.- Parameters:
is
- Input stream- Throws:
IOException
-
getName
- Specified by:
getName
in interfaceorg.apache.commons.httpclient.HttpMethod
- Specified by:
getName
in classorg.apache.commons.httpclient.HttpMethodBase
-