1

I have some client-side infos (a long associative array encoded with JSON) that I would like to send to the server with POST, to create an image based on those infos. The goal is to download that image using Phonegap primitives and saving it to the local storage.

Is there a way to do it?

Looking to the phonegap reference is there no way to send explicitely post data. Should I work with the parameter "header" (???) ?

Example:

var fileTransfer = new FileTransfer();
var uri = encodeURI("http://some.server.com/create_my_image.php");

fileTransfer.download(
    uri,
    filePath,
    function(entry) {
        console.log("download complete: " + entry.fullPath);
    },
    function(error) {
        console.log("download error source " + error.source);
        console.log("download error target " + error.target);
        console.log("upload error code" + error.code);
    },
    false,
    {
        // HERE ADD SOME CODE TO SEND POST DATA?
        headers: {
            "???": "???"
        }
    }
);
4

0 に答える 0