aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJustin Karneges <justin@affinix.com>2013-01-28 17:45:13 -0800
committerJustin Karneges <justin@affinix.com>2013-01-28 17:45:13 -0800
commit1f2e481cba235271d70b5a6c1b49fe89872d774c (patch)
treed53d07cbad0b7de8859d7f670ba23f89f8453b3b
parentdee58864a8b761ce8ed11aa74ad9d7344e8c9b78 (diff)
downloadpollymer-1f2e481cba235271d70b5a6c1b49fe89872d774c.tar
pollymer-1f2e481cba235271d70b5a6c1b49fe89872d774c.tar.gz
initial readme
-rw-r--r--README57
-rw-r--r--README.md4
2 files changed, 57 insertions, 4 deletions
diff --git a/README b/README
new file mode 100644
index 0000000..0ddf6cd
--- /dev/null
+++ b/README
@@ -0,0 +1,57 @@
+PollDance
+---------
+Date: January 28th, 2013
+Authors: Justin Karneges <justin@fanout.io>
+ Katsuyuki Ohmuro <harmony7@pex2.jp>
+
+PollDance is a general purpose AJAX library, implementing multiple transports
+to ensure cross-domain access works in all major browsers. It also provides
+conveniences for long-polling applications such as retries, exponential
+backoff between requests, and randomized request delaying.
+
+Dependencies:
+
+ json2.js
+
+Available Transports:
+
+ XmlHttpRequest - for all modern CORS browsers
+ JSON-P - for IE7, IE8, IE9, and older versions of other browsers
+
+Limitations:
+
+ - Responses from the server must be in JSON format. This library will parse
+ the data and return an object to the application.
+ - If the JSON-P transport is used, the request headers and body are subject
+ to URI length limitations of the browser and server.
+ - It is not possible to inspect the headers of a response.
+
+Usage:
+
+ var req = new PollDance.Request();
+ req.on('finished', function(code, result) { ... });
+ req.on('error', function(reason) { ... });
+ var headers = { ... };
+ var body = 'some data';
+ req.start('POST', 'http://example.com/path', headers, body);
+
+JSON-P Protocol:
+
+ This library supports JSON-P by supplying the following query string
+ parameters in the request:
+
+ callback: the JavaScript function to call in the response
+ method: the method name (default GET)
+ headers: additional headers encoded as JSON (default none)
+ body: request body (default empty)
+
+ This protocol dictates that the presence of the "callback" parameter
+ signifies the request as a JSON-P request. The remaining parameters are
+ optional.
+
+ The server is expected to reply with a JSON object of the form:
+
+ {
+ "status": code,
+ "value": object
+ }
diff --git a/README.md b/README.md
deleted file mode 100644
index d1b44e6..0000000
--- a/README.md
+++ /dev/null
@@ -1,4 +0,0 @@
-polldance
-=========
-
-JavaScript AJAX/long-polling library \ No newline at end of file