Skip to content

Commit

Permalink
Add json parse if its possible
Browse files Browse the repository at this point in the history
  • Loading branch information
talyguryn committed Nov 1, 2017
1 parent e102b10 commit d8bfa7b
Show file tree
Hide file tree
Showing 5 changed files with 51 additions and 37 deletions.
29 changes: 29 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
# codex.ajax

Native AJAX module

## Usage

```js
ajax.call({
type: 'POST',
url: '/target/url',
data: {},
before: function () {},
progress: function (percentage) {
console.log(percentage + '%');
// ...
},
success: function (response) {
response = JSON.parse(response);
console.log(response);
// ...
},
error: function (response) {
response = JSON.parse(response);
console.log(response);
// ...
},
after: function () {},
});
```
2 changes: 1 addition & 1 deletion lib/bundle.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit d8bfa7b

Please sign in to comment.