Permalink
Browse files

Updated readme

  • Loading branch information...
1 parent 5fdf707 commit 3acd25d10b99f66c4444fddee2188933438659b5 @dave-irvine committed May 28, 2012
Showing with 69 additions and 55 deletions.
  1. +69 −55 README.md
View
124 README.md
@@ -1,56 +1,70 @@
-Ajax.js
-=======
-
-A useless and redundant library to make Ajax calls.
-
-I got a little tired of loading all of jQuery/Prototype/mootools/...
-just to do Ajax requests, but I also wanted something a little fancier than plain JS.
-Hence Ajax.js, a simple, lightweight library to perform Ajax requests in a semi-chainable
-manner.
-
-Usage
------
-
-Include the library, then call it like this:
-
-Simple Ajax Request
--------------------
-
-```javascript
-Ajax({ url : "http://target.url" });
-```
-
-Handling Responses
-------------------
-
-```javascript
-Ajax({ url : "http://target.url" }).done(function(data) {
-
-});
-```
-
-Sending Data
-------------
-
-```javascript
-Ajax(
-{
- url : "http://target.url",
- data : {
- "key" : "value"
- }
-});
-```
-
-Mixing URL Parameters and Data
-------------------------------
-
-```javascript
-Ajax(
-{
- url : "http://target.url?parameter=value",
- data : {
- "key" : "value"
- }
-});
+Ajax.js
+=======
+
+A useless and redundant library to make Ajax calls.
+
+I got a little tired of loading all of jQuery/Prototype/mootools
+just to do Ajax requests, but I also wanted something a little fancier than plain JS.
+Hence Ajax.js, a simple, lightweight library to perform Ajax requests in a semi-chainable
+manner.
+
+Usage
+-----
+
+Include the library, then call it like this:
+
+Simple Ajax Request
+-------------------
+
+```javascript
+Ajax({ url : "http://target.url" });
+```
+
+Handling Responses
+------------------
+
+```javascript
+Ajax({ url : "http://target.url" }).done(function(data) {
+
+});
+```
+
+Sending Data
+------------
+
+```javascript
+Ajax(
+{
+ url : "http://target.url",
+ data : {
+ "key" : "value"
+ }
+});
+```
+
+Mixing URL Parameters and Data
+------------------------------
+
+```javascript
+Ajax(
+{
+ url : "http://target.url?parameter=value",
+ data : {
+ "key" : "value"
+ }
+});
+```
+
+POST Requests
+-------------
+
+```javascript
+Ajax(
+{
+ url : "http://target.url",
+ method : "POST",
+ data : {
+ "key" : "value"
+ }
+});
```

0 comments on commit 3acd25d

Please sign in to comment.