Skip to content

Instantly share code, notes, and snippets.

@jonm
Created July 16, 2012 10:47
Show Gist options
  • Save jonm/3122100 to your computer and use it in GitHub Desktop.
Save jonm/3122100 to your computer and use it in GitHub Desktop.
Retrieve and edit a text/uri-list
GET /favorites HTTP/1.1
User-Agent: curl/7.16.4 (i386-apple-darwin9.0) libcurl/7.16.4 OpenSSL/0.9.7l zlib/1.2.3
Host: www.example.com
Accept: text/uri-list;q=1.0, */*;q=0.9
...
HTTP/1.1 200 OK
Date: Mon, 16 Jul 2012 10:38:12 GMT
Content-Type: text/uri-list; charset=utf-8
Server: Apache/2.4.1 (Unix) OpenSSL/1.0.0g
ETag: "7ca4cd3a3b2dc09e389e1b89568428be"
Content-Length: 228
http://www.example.com/raindrops-on-roses
ftp://www.example.com/sleighbells
http://www.example.com/crisp-apple-strudel
http://www.example.com/doorbells
tag:[email protected],2012-07-01:bright-copper-kettles
urn:isbn:0-061-99881-8
...
PATCH /favorites HTTP/1.1
User-Agent: curl/7.16.4 (i386-apple-darwin9.0) libcurl/7.16.4 OpenSSL/0.9.7l zlib/1.2.3
Host: www.example.com
Accept: text/uri-list;q=1.0, */*;q=0.9
Content-Type: text/diff; charset=utf-8
Content-Length: 243
If-Match: "7ca4cd3a3b2dc09e389e1b89568428be"
--- favs.txt 2012-07-16 06:45:59.000000000 -0400
+++ favs-new.txt 2012-07-16 06:49:52.000000000 -0400
@@ -3,2 +3,3 @@
http://www.example.com/crisp-apple-strudel
+http://www.example.com/schnitzel-with-noodles
http://www.example.com/doorbells
...
HTTP/1.1 200 OK
Date: Mon, 16 Jul 2012 10:38:15 GMT
Content-Type: text/uri-list; charset=utf-8
Server: Apache/2.4.1 (Unix) OpenSSL/1.0.0g
ETag: "30bd0f03380afd045e00e570df810881"
Content-Length: 274
http://www.example.com/raindrops-on-roses
ftp://www.example.com/sleighbells
http://www.example.com/crisp-apple-strudel
http://www.example.com/schnitzel-with-noodles
http://www.example.com/doorbells
tag:[email protected],2012-07-01:bright-copper-kettles
urn:isbn:0-061-99881-8
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment