configures the data sending mode
mode | string | the data sending mode, "GET"|"POST"|"REST"|"JSON" (see related articles for details) |
total | boolean | defines, whether all data is sent all at once, or each record is sent by a separate request |
dp.setTransactionMode("POST", true);
In order to send custom HTTP request headers or some additional data to the server, you need to specify the first parameter as an object and define the following properties inside of it:
dp.setTransactionMode({
mode:"POST",
headers:{
"Content-Type": "application/x-www-form-urlencoded",
"Accept-Language": "fr-FR"
},
payload:{
"user_id":"12"
}
}, true);