Check documentation for the latest version of dhtmlxSuite setTransactionMode DHTMLX Docs

setTransactionMode

configures the data sending mode

void setTransactionMode(string mode,boolean total);
modestringthe data sending mode, "GET"|"POST"|"REST"|"JSON" (see related articles for details)
totalbooleandefines, whether all data is sent all at once, or each record is sent by a separate request

Example

dp.setTransactionMode("POST", true);

Details

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:

  • mode - (string) data sending mode, "GET", "POST", "REST", "JSON"
  • headers - (object) a set of headers, defined as "key":"value" pairs that should be sent with a request
  • payload - (object) additional data, set as "key":"value" pairs that should be sent to the server together with headers
dp.setTransactionMode({
    mode:"POST",
    headers:{
        "Content-Type": "application/x-www-form-urlencoded",
        "Accept-Language": "fr-FR"
    },
    payload:{
        "user_id":"12"
    }
}, true);
See also
Back to top