Files
NativeScript/apps/tests/http.md
2016-04-14 15:20:35 +03:00

36 lines
829 B
Markdown

---
nav-title: "http How-To"
title: "How-To"
description: "Examples for using http"
---
# Http module
Using http methods requires to load "http" module.
<snippet id='http-require'/>
### Get string from URL
<snippet id='http-get-string'/>
### Get JSON from URL
<snippet id='http-get-json'/>
### Get Image from URL
<snippet id='http-get-image'/>
### Get File from URL. By default the file will be saved in Documents folder.
<snippet id='http-get-urlfile'/>
### Get content as File from URL. You can specify where the file should be saved.
<snippet id='http-get-urlfile-content'/>
### Get response status code
<snippet id='http-get-response'/>
### Get response headers
<snippet id='http-get-response-headers'/>
### Get response content
<snippet id='http-get-response-content'/>
### Post JSON
<snippet id='http-post-json'/>