Files
NativeScript/tests/app/http/http.md
Hristo Hristov 7b5ef052fd Tests moved into separate folders (#3794)
Fix android crash on application exit
2017-03-15 12:26:54 +02:00

853 B

nav-title, title, environment, description, previous_url
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%}