CORS impossible? How to get around D8's lack of support for pre-flight OPTIONS request
Hi @enzolutions - When doing Update operations on Models, Does backbone.drupal get around this rest-critical issue somehow? If it does, I can't seem to get it working locally.
\ RJ
Hi @rjsteinert the update project must to be implemented using PATCH request, but for some reason is failing, I didn't have time to find the problem.
If you can debug the information send and what drupal 8 Rest Patch expect that could be useful and I can apply any necessary change.
I have plan to implement a new Rest in Drupal 8 called Relaxed Webservice https://www.drupal.org/project/relaxed
If you can debug the information send and what drupal 8 Rest Patch expect that could be useful and I can apply any necessary change.
I think we are stuck until that D8 critical gets fixed, browsers enforce doing a pre-flight OPTIONS request before doing a PATCH request. So, no OPTIONS support in Drupal REST means we can't do PATCH requests CORS. I tried some hacky stuff to get around the pre-flight but no luck.
I have plan to implement a new Rest in Drupal 8 called Relaxed Webservice
Relaxed! I looooove the CouchDB reference in the logo. I ultimately crave a JS library similar to jquery.couch.js. Functions like saveDoc and login without having to learn the idiosyncrasies of Drupal's REST implementation. Tyler Frankenstein has been working on a JS library called jDrupal that is similar to jquery.couch.js. I wonder if you two should join forces.
jDrupal + Relaxed = Happy Front End Developers?
Hi @rjsteinert actually is OPTIONS could be skiped using the .htacess changes I put in Readme options.
About what is the change necessary to apply in PATCH call I didn't determine yet what is wrong for that reason I need help, but you had a point when you said maybe we have to wait until Drupal 8 get released.
In have plans to implement in this project Drupal MarionetteJS Generator integration with Relaxed to implement offline first, so in my mind yes that means Happy Front End Developers.
I have done a couple of projects with PouchDB for offline apps. Are you thinking that as a user browses a an App connected to Drupal that it stores every Entity requested from Drupal in a Pouch database so that when the Browser goes offline that the data is still there?
My idea is fetch what is necessary to work offline and user will be able to add new record in their local environment for personal information imagine a contact list, that only affect you own universe could be perfect offline first.