3.4 Example 4: Access a Remote File Using WebDAV
Access a Remote File Using WebDAV illustrates a typical user interaction with the WebDAV service, as the user locates a file within a web directory, writes into it, and then reads the file. This example demonstrates the use case described in section 2.5.4.
Prerequisites
All general requirements as set forth in section 2.4 Assumptions and Preconditions are met.
The user has the URL of a web directory.
A file exists in the web directory and User has write access to the file.
Initial System State
None.
Final System State
User has updated a specific file in web directory.
Sequence of events
Figure 18: Sequence diagram for Access a remote file using WebDAV
The application directs the file client to send a GET request via a WebDAV HTTP request ([RFC4918] section 9.4). This is sent to the WebDAV service in order to enumerate a list of files and directories from a known URL.
The WebDAV service sends a GET response with a list of files and directories to the file client ([RFC4918] section 9.4).
The application directs the file client to send a PUT request via a WebDAV HTTP request ([RFC4918] section 9.7) in order to write content to the specified file.
On success, the WebDAV service responds to the file client with a PUT response ([RFC4918] section 9.7).
The application directs the file client to send a GET request via a WebDAV HTTP request ([RFC4918] section 9.4) to WebDAV service in order to read the contents of specified file.
The WebDAV service sends a GET response with the content of the specified file to the file client ([RFC4918] section 9.4).