@@ -18,12 +18,10 @@ bower install qajax
18
18
19
19
Also available on [ NPM] ( https://npmjs.org/package/qajax ) .
20
20
21
- Tests
21
+ Links
22
22
---
23
23
24
- The library is stress-tested with ` qunit ` and a mock node.js server which test different edge-cases like different HTTP code, method, server lag,...
25
-
26
- [ ![ SauceLabs Status] ( https://saucelabs.com/browser-matrix/qajax.svg )] ( https://saucelabs.com/u/qajax )
24
+ [ Checkout the Annotated Source Code] ( http://greweb.me/qajax/docs/qajax.html )
27
25
28
26
Usages and explanations
29
27
---
@@ -34,6 +32,17 @@ Usages and explanations
34
32
35
33
The ` Qajax ` function ** just** returns a successful ** Promise of XHR** when the server has returned a result - whatever the ` status ` code is.
36
34
35
+
36
+ There are 3 possible signatures:
37
+
38
+ ``` javascript
39
+ Qajax (url: String ) => Promise [XHR ]
40
+ Qajax (options: Object ) => Promise [XHR ]
41
+ Qajax (url: String , options: Object ) => Promise [XHR ]
42
+ ```
43
+
44
+ Simple usage:
45
+
37
46
``` javascript
38
47
var promiseOfXHR = Qajax (" /all.json" );
39
48
// short version of: Qajax({ url: "/all.json", method: "GET" });
@@ -115,7 +124,7 @@ More advanced features
115
124
* Qajax has a ** timeout** :
116
125
117
126
``` javascript
118
- var p = Qajax ({ url : " /" , timeout: 5000 });
127
+ var p = Qajax (" /" , { timeout: 5000 });
119
128
// p will be rejected if the server is not responding in 5 seconds.
120
129
```
121
130
@@ -148,5 +157,36 @@ function getResults (query) {
148
157
*/
149
158
```
150
159
151
- [ Checkout the Annotated Source Code] ( http://greweb.me/qajax/docs/qajax.html )
160
+ Tests
161
+ ---
162
+
163
+ The library is stress-tested with ` qunit ` and a mock node.js server which test different edge-cases like different HTTP code, method, server lag,...
164
+
165
+ [ ![ SauceLabs Status] ( https://saucelabs.com/browser-matrix/qajax.svg )] ( https://saucelabs.com/u/qajax )
166
+
167
+ Test locally: ` grunt test-local ` and go to ` http://localhost:9999/test/ ` .
168
+
169
+ Development
170
+ ---
171
+
172
+ Install dev deps with ``` npm install ``` .
173
+ Then run ``` grunt ``` .
174
+
175
+ Release Note
176
+ ---
177
+
178
+ 0.1.3
179
+
180
+ * Add new signature ` Qajax(url, settings) ` + validation
181
+
182
+ 0.1.2
183
+
184
+ * Using require('q') properly
185
+
186
+ 0.1.1
187
+
188
+ * Fix CommonJS compatibility
189
+
190
+ 0.1.0
152
191
192
+ * Initial release with Qajax, filterStatus, filterSuccess, toJSON, getJSON, serialize
0 commit comments