diff --git a/README.md b/README.md index 79fbabd..7b779f3 100644 --- a/README.md +++ b/README.md @@ -83,6 +83,7 @@ file upload. ### PUT \ **Request Example:** + ``` PUT /files/123d3ebc995732b2 HTTP/1.1 Host: tus.example.com @@ -100,6 +101,29 @@ HTTP/1.1 200 Ok ### HEAD \ +**Request Example:** + +``` +HEAD /files/123d3ebc995732b2 HTTP/1.1 +Host: tus.example.com +``` + +**Response Example:** +``` +HTTP/1.1 200 Ok +Content-Length: 100 +Content-Type: image/jpg +X-Resume: bytes=20-50,60-99 +``` + +The `X-Resume` header holds a [byte +range](http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.35.1) that +informs the client which parts of the file have not been received yet. It is +up to the client to choose appropiate `PUT` requests to complete the upload. + +The absence of a `X-Resume` header means that the the entire file has been +received by the server. + ### GET \ Used to download an uploaded file.