{"id":136,"date":"2003-06-26T23:32:53","date_gmt":"2003-06-26T13:32:53","guid":{"rendered":"http:\/\/www.erisian.com.au\/wordpress\/?p=136"},"modified":"2003-06-26T23:32:53","modified_gmt":"2003-06-26T13:32:53","slug":"ecash-and-http","status":"publish","type":"post","link":"https:\/\/www.erisian.com.au\/wordpress\/2003\/06\/26\/ecash-and-http","title":{"rendered":"Ecash and HTTP"},"content":{"rendered":"<p>One of the tricks with paying for http requests is that you screw up the protocol. Normal http requests are a simple request\/response pair, and that&#8217;s it &#8212; you ask for a page, and you get given it. Worse, the protocol is optimised for that: if you want to do more than just send a request, you usually have to open additional connections for each, which has a significant overhead.<\/p>\n<p>The easiest way to work around this, is probably to make the protocol for requesting a webpage be to send a HEAD request, which will confirm the webpage exists and that you don&#8217;t have a current cached copy and can also tell you how much it costs to download, and then send a GET request with the appropriate ecoin as a header. With HTTP\/1.1 you can, I believe, make persistant connections to make this possible. I think this is also optimally efficient, and involves minimal changes to the protocol. (There&#8217;s even a &#8220;Payment required&#8221; error code, how convenient)<\/p>\n","protected":false},"excerpt":{"rendered":"<p>One of the tricks with paying for http requests is that you screw up the protocol. Normal http requests are a simple request\/response pair, and that&#8217;s it &#8212; you ask for a page, and you get given it. Worse, the protocol is optimised for that: if you want to do more than just send a [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[5],"tags":[],"_links":{"self":[{"href":"https:\/\/www.erisian.com.au\/wordpress\/wp-json\/wp\/v2\/posts\/136"}],"collection":[{"href":"https:\/\/www.erisian.com.au\/wordpress\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.erisian.com.au\/wordpress\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.erisian.com.au\/wordpress\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.erisian.com.au\/wordpress\/wp-json\/wp\/v2\/comments?post=136"}],"version-history":[{"count":0,"href":"https:\/\/www.erisian.com.au\/wordpress\/wp-json\/wp\/v2\/posts\/136\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.erisian.com.au\/wordpress\/wp-json\/wp\/v2\/media?parent=136"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.erisian.com.au\/wordpress\/wp-json\/wp\/v2\/categories?post=136"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.erisian.com.au\/wordpress\/wp-json\/wp\/v2\/tags?post=136"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}