Skip to content

Commit

Permalink
skip property
Browse files Browse the repository at this point in the history
  • Loading branch information
m1ga committed Aug 20, 2022
1 parent ec098df commit afe9e81
Showing 1 changed file with 20 additions and 20 deletions.
40 changes: 20 additions & 20 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -150,8 +150,8 @@ This one is quite useful if you need to change the parameters which are going to
{
...
beforePost: function(params, callback) {
params.something = 'else';
callback(params);
params.something = 'else';
callback(params);
},
...
}
Expand All @@ -166,18 +166,18 @@ These are similar to beforeSend but works for all requests (GET, PUT, DELETE, PO
{
...
beforeSend: function(data, callback) {
if (Ti.Network.online) {
callback(data);
} else {
alert("No internet connection!");
callback({
skip: true,
error: "no_internet"
});
// will call your success method and pass `error:no_internet` to it
}
},
...
if (Ti.Network.online) {
callback(data);
} else {
alert("No internet connection!");
callback({
skip: true,
error: "no_internet"
});
// will call your success method and pass `error:no_internet` to it
}
},
...
}
```
### Errors
Expand Down Expand Up @@ -283,13 +283,13 @@ Here's a **PUT** request example, passing an id (you'd need to ensure you have a
```javascript
api.updateVideo({
objectId: "123",
body: {
categoryId: 2,
name: "My Video2"
}
objectId: "123",
body: {
categoryId: 2,
name: "My Video2"
}
}, function(video) {
// do stuff with the video
// do stuff with the video
});
```
Expand Down

0 comments on commit afe9e81

Please sign in to comment.