acquia / waterwheel.js

A generic JavaScript helper library to query and manipulate Drupal 8 via core REST and JSON API
https://github.com/acquia/waterwheel.js
233 stars 26 forks source link

Setting content type is case sensitive prior to axios@0.13 #35

Closed brendan-hurley closed 7 years ago

brendan-hurley commented 7 years ago

Hi,

Axios dependencies listed at 0.11. Prior to this commit in axios project header type 'Content-Type' is case sensitive as preceeding, but is currently set as 'Content-type'.

I noticed that the Content-Type request header value was being duplicated on 'POST' and 'PATCH' requests, like this: 'application/json, application/json' and this was causing my Drupal instance to fall over. This patch fixes that.

Suggest either updating the module or taking in this patch if appropriate.

Thanks, Brendan.

mattgrill commented 7 years ago

@creativebench 👍

mattgrill commented 7 years ago

@creativebench Can you update the version in package.json and I'll merge this?

brendan-hurley commented 7 years ago

Updated version - is showing your commits as I merged them in to my own fork.

Cheers!

mattgrill commented 7 years ago

@creativebench Humm, wonder whats going on here. Maybe your fork is bugged somehow? Maybe you can cherry pick just your commits and apply them directly to a new branch from the tip of acquia:0.7.0?

brendan-hurley commented 7 years ago

Sorry - what a cock up... I'll start again - it probably happened somewhere between the first and second PRs. All this for a couple of lines eh!