From afe9e8170b7b20c22eb0f2b36b33cca7e3a8e51c Mon Sep 17 00:00:00 2001 From: m1ga Date: Sat, 20 Aug 2022 15:46:36 +0200 Subject: [PATCH] skip property --- readme.md | 40 ++++++++++++++++++++-------------------- 1 file changed, 20 insertions(+), 20 deletions(-) diff --git a/readme.md b/readme.md index 868de60..e2112e6 100644 --- a/readme.md +++ b/readme.md @@ -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); }, ... } @@ -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 @@ -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 }); ```