clemens-tolboom / drupal-8-rest-angularjs

Test angularjs frontend for Drupal 8 ReST
MIT License
48 stars 16 forks source link

Solve the problem json versus hal+json #3

Closed clemens-tolboom closed 9 years ago

clemens-tolboom commented 9 years ago

AFAIK we cannot post/patch in json requests.

Currently all request goes as hal+json which is far from ideal.

nevos commented 9 years ago

Looking at the config - it's necessary to add json only permission on REST to view the node content. otherwise you get 406 (Not Acceptable).

clemens-tolboom commented 9 years ago

The problem lies in the node life cycle. We can now test edit a node on node/lifecycle (it's a little grumpy so use refresh on DELETE, POST, PATCH)

That is only possible if we fetch a node in hal+json as POST/PATCH needs node._links AFAIK to work. There are core bugs on the json data flow.

I've added #6 to mitigate this a little in the future.

clemens-tolboom commented 9 years ago

@nevos what config do you refer?

clemens-tolboom commented 9 years ago

For now I require hal_json for all interaction.