mirror of
https://github.com/NativeScript/NativeScript.git
synced 2025-08-16 11:42:04 +08:00
853 B
853 B
nav-title | title | environment | description | previous_url |
---|---|---|---|---|
http How-To | http | nativescript | Examples for using http | /ApiReference/http/HOW-TO |
Http module
Using http methods requires to load "http" module. {%snippet http-require%}
Get string from URL
{%snippet http-get-string%}
Get JSON from URL
{%snippet http-get-json%}
Get Image from URL
{%snippet http-get-image%}
Get File from URL. By default the file will be saved in Documents folder.
{%snippet http-get-urlfile%}
Get content as File from URL. You can specify where the file should be saved.
{%snippet http-get-urlfile-content%}
Get response status code
{%snippet http-get-response%}
Get response headers
{%snippet http-get-response-headers%}
Get response content
{%snippet http-get-response-content%}
Post JSON
{%snippet http-post-json%}