You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi, I am on Electron env. My calendar lib is located on the renderer process, therefore 'fetch' does throws CORS for Gmail/iCloud.
I am using XHR tunnel in my project for such cases, so that any XMLHttpRequest goes through tunnel to main thread and executes the request there.
Is there any standard way to tell this lib to use XHR instead of fetch? I did not find a quick way.
*Please do not suggest me to move the lib completely to main thread as we support all platforms and it's not quite easy to do, I'd rather implement manual patches in all request places if needed.
The text was updated successfully, but these errors were encountered:
Hi, I am on Electron env. My calendar lib is located on the renderer process, therefore 'fetch' does throws CORS for Gmail/iCloud.
I am using XHR tunnel in my project for such cases, so that any XMLHttpRequest goes through tunnel to main thread and executes the request there.
Is there any standard way to tell this lib to use XHR instead of fetch? I did not find a quick way.
*Please do not suggest me to move the lib completely to main thread as we support all platforms and it's not quite easy to do, I'd rather implement manual patches in all request places if needed.
Hi, i don't think the problem is "fetch is better than xhr".
You need to be clear on what errors are produced here.
The fact is that im fighting against my browser to be able to add events to a caldav server from javascript. I had MANY errors related with preflight request/CORS and xhr was not doing better than fetch.
The real problem here is that browser are not allowed to make PROPFIND request so easily and i guess its the same for the renderer thread of electron.
What im doing was hightly trivial in node but is absolutely harder with browser context since you need to dig a lot of docs.
Hi, I am on Electron env. My calendar lib is located on the renderer process, therefore 'fetch' does throws CORS for Gmail/iCloud.
I am using XHR tunnel in my project for such cases, so that any XMLHttpRequest goes through tunnel to main thread and executes the request there.
Is there any standard way to tell this lib to use XHR instead of fetch? I did not find a quick way.
*Please do not suggest me to move the lib completely to main thread as we support all platforms and it's not quite easy to do, I'd rather implement manual patches in all request places if needed.
The text was updated successfully, but these errors were encountered: