Hi,
I have a Node.js backend server and for react kanban board I'm using a data manager to get and update data. I have implemented authentication with passport in the backend. How do I make the adaptor include the credentials with the request. Like axios has withCredentials flag.
Since the adaptor is not passing the credentials, the server is not responding with the Json file. If I make the request with Axios, I get the data and can populate the cards.
The behavior of URL Adaptor is different from the Axios. You can use the headers property of Data Manager to send the required details in the request header.
let data = new ej.data.DataManager({ url: "Home/UrlDataSource", headers: headers, adaptor: new ej.data.UrlAdaptor }); |
Screenshot:
Regards,
Vinitha
That doesn't solve the problem. Setting header won't include credentials with the request. I need to specify to include credentials when making the request. The cookie is HTTP only so I can't access the cookie and set it in headers myself. Can I make a custom adaptor that uses axios to make requests? I can't find any example of that. Could you help me with that?
I want to change withCredentials to true in httpRequest inside requests. This is my data manager logged on console.