Created
July 7, 2017 18:20
-
-
Save MgenGlder/7b5e35b4d4cf2145a26501d817ec8d63 to your computer and use it in GitHub Desktop.
Example http client
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var httpClient : HTTPClient = new HTTPClient(); | |
var message : String; | |
httpClient.setTimeout(timeout || 20000); | |
httpClient.open('GET', crossSiteRequest, "storefront", password); | |
httpClient.send(); | |
if (httpClient.statusCode == 200) { | |
message = httpClient.text; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment