The MKCOL method creates a new Collection object at the request URI. A MKCOL request will only succeed if all the parents exist. This is important to note as it means that to create Collections within Collections each layer must be created with separate MKCOL requests.
|201 Created||The Collection has been created|
|403 Forbidden||It's not possible to create new Collections at the Request URI|
|405 Method Not Allowed||The Collection already exists|
|409 Conflict||The parent Collection does not exist|
This creates a new folder called Test within /Example/Files/. As /Example/Files/ already exists this request succeeds.
...... MKCOL /Example/Files/Test/ HTTP/1.1 ......
HTTP/1.1 201 Created
The following request attempts to create a folder /Example/Files/Fail/Test, however as /Example/Files/Fail does not exist, the request fails.
...... MKCOL /Example/Files/Fail/Test HTTP/1.1 .....
HTTP/1.1 409 Conflict