mirror of
https://github.com/NativeScript/NativeScript.git
synced 2025-08-18 05:18:39 +08:00
readme code fixed
This commit is contained in:
@ -4,14 +4,14 @@
|
|||||||
|
|
||||||
http.getString("http://www.reddit.com/").then(function(result) {
|
http.getString("http://www.reddit.com/").then(function(result) {
|
||||||
// Result is string!
|
// Result is string!
|
||||||
}, function(e) { console.log("Error:" + e.message); });
|
}).fail(function(e) { console.log("Error:" + e.message); });
|
||||||
|
|
||||||
http.getJSON("http://www.reddit.com/r/aww.json?limit=10").then(function(result) {
|
http.getJSON("http://www.reddit.com/r/aww.json?limit=10").then(function(result) {
|
||||||
// Result is JSON!
|
// Result is JSON!
|
||||||
}, function(e) { console.log("Error:" + e.message); });
|
}).fail(function(e) { console.log("Error:" + e.message); });
|
||||||
|
|
||||||
http.getImage("http://www.telerik.com/sfimages/default-source/Homepage/hp_any_approachf6e4079a7a99493a8ab2e367b9cb3f7d.png").then(function(result) {
|
http.getImage("http://www.telerik.com/sfimages/default-source/Homepage/hp_any_approachf6e4079a7a99493a8ab2e367b9cb3f7d.png").then(function(result) {
|
||||||
// Result is tk.ui.Image!
|
// Result is tk.ui.Image!
|
||||||
}, function(e) { console.log("Error:" + e.message); });
|
}).fail(function(e) { console.log("Error:" + e.message); });
|
||||||
|
|
||||||
```
|
```
|
Reference in New Issue
Block a user