Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

153. axios put 与 Content-Type #153

Open
ly525 opened this issue Aug 28, 2018 · 0 comments
Open

153. axios put 与 Content-Type #153

ly525 opened this issue Aug 28, 2018 · 0 comments

Comments

@ly525
Copy link
Owner

ly525 commented Aug 28, 2018

  1. 发现 axios.put 如果 payload 是字符串(let payload = JSON.stringify(state.form);),则 Content-Type会默认转成 application/x-www-form-urlencoded
  2. 而 payload 是Object ,则转成 Content-Type: application/json;charset=UTF-8
  3. 背后的真相究竟是什么呢
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant