By default, the library adds these headers, according to the JSON API MIME Types:
Accept: application/vnd.api+json Content-Type: application/vnd.api+json
You can also add your custom headers to be appended to each http call:
this.datastore.headers = new Headers({'Authorization': 'Bearer ' + accessToken});
Or you can pass the headers as last argument of any datastore call method:
this.datastore.findAll(Post, { include: 'comments' }, new Headers({'Authorization': 'Bearer ' + accessToken}));
and in the save() method:
save()
post.save({}, new Headers({'Authorization': 'Bearer ' + accessToken})).subscribe();
There was an error while loading. Please reload this page.