Ajax cross-domain request


#1

I’m trying to make a cross-domain request that involve sending cookies. But it seems that there is no way to set the flag withCredentials for XMLHttpRequest or credential:include both for dhx.form.send or dhx.ajax's functions. Could be this an enhancement in the future?


#2

I’m also looking for this exact same thing. My current project is not sending cookies with requests, and it needs to.


#3

You may try to add your headers in the config (third attribute) of your get request:
https://docs.dhtmlx.com/suite/ajax__api__get.html


#4

Clever. Thanks, I ignored this option. This will work for dhx.ajax. Unfortunately form.send doesn’t have this option. Although doing the form submission using dhx.ajax shouldn’t be a problem in most cases.


#5

Unfortunaetly the form.send() method does not allow to add the custom/additional headers to the request