*building a app for gps66st so the memory requirement are different i suppose*
I'm trying to load a pdf but only receive a portion (1569 byte for the body instead of 2millions)
Is there something I'm doing wrong ?
function onReceive(responseCode, data) {
if (responseCode == 200) {
System.println("Request Successful ");
System.println(data.length());
}
else {
System.println("Response: " + responseCode); // print response code
}
}
function makeRequest() {
var url = "https://s3.amazonaws.com/imagescloud/documents/tirages/cartes/ANT_Cerf_Secteur_chicotte-vtt.pdf"; // set the url
var options = { // set the options
:method => Communications.HTTP_REQUEST_METHOD_GET, // set HTTP method
:headers => { // set headers
"Accept" => "*/*",
"Host" => "s3.amazonaws.com"
}, // set response type
:responseType => Communications.HTTP_RESPONSE_CONTENT_TYPE_TEXT_PLAIN
};
var responseCallback = method(:onReceive); // set responseCallback to
// onReceive() method
// Make the Communications.makeWebRequest() call
Communications.makeWebRequest(url, null, options, method(:onReceive));
}