Quantcast
Channel: Appcelerator Developer Center Q&A Unanswered Questions 20
Viewing all articles
Browse latest Browse all 8068

httpclient send arrays to server

$
0
0

I need to send data from a large form to server. Most of the values are arrays something like following:

var params = {
    username: 'username',
    id: 'id',
    description: {
        defLang: "someText",
        en: "Text in english",
        fr: "French text",
            ...
    },
    pictures: [pic1,pic2,pic3,....],    //Each index has TiBlob data
    videos: [vid1,vid2,vid3,....],      //Each index has TiBlob data
        .....
}
xhr.send(params);
I can get single string values (like username,id, etc) in PHP but not array values. I am currently uploading with following method which works:
var params = {
        ...
    pic1: pic1,
    pic2: pic2,
    pic3: pic3,
        ...
}
xhr.send(params);
Is it possible to send arrays/objects as POST parameter to PHP through HTTPClient.send()?

Viewing all articles
Browse latest Browse all 8068

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>