Files
2016-07-06 16:09:11 +03:00

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%}