From deacf64d90fb204ccc51603c7fbfc5b165071b9e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Felix=20Geisendo=CC=88rfer?= Date: Sun, 17 Mar 2013 12:50:08 +0100 Subject: [PATCH] HEAD request --- README.md | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) 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.