Skip to content
This repository has been archived by the owner on Dec 13, 2018. It is now read-only.

Use application/json as default content type for POST #171

Open
robertjd opened this issue Aug 16, 2016 · 0 comments
Open

Use application/json as default content type for POST #171

robertjd opened this issue Aug 16, 2016 · 0 comments
Milestone

Comments

@robertjd
Copy link
Member

robertjd commented Aug 16, 2016

We are currently using application/x-www-form-urlencoded as the default value for STORMPATH_CONFIG.FORM_CONTENT_TYPE. This is a leftover from the initial version, and this should now be changed to application/json. This should be a major version issue because some may have configured their body parsing middleware to only look at form encoded posts, so switching the content type will break their application.

In the meantime, you can manually configure the library like so:

angular.module('myapp')
  .config(function(STORMPATH_CONFIG){
      STORMPATH_CONFIG.FORM_CONTENT_TYPE = 'application/json';
  });
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant