Skip to content

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

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

147. axios.post but sent a GET request #147

Closed
ly525 opened this issue Aug 14, 2018 · 0 comments
Closed

147. axios.post but sent a GET request #147

ly525 opened this issue Aug 14, 2018 · 0 comments

Comments

@ly525
Copy link
Owner

ly525 commented Aug 14, 2018

axios 代码中写的明明是 发送一个 POST 请求,但在浏览器中 xhr 中却看到的是一个GET 请求,是什么原因?

  1. 和 某些后端框架(比如python的Django)有一定关系,比如Django(对应检查你的后端) 默认URL末尾要加上 斜杠。
  2. 相关链接:axios.post sends a GET request axios.post sends a GET request axios/axios#1629
  3. chrome debug tab 分类是根据 response content-type

这时候要点一下 all ,看一下全部请求,不要只看 xhr
image

@ly525 ly525 added the HTTP label Dec 7, 2018
@ly525 ly525 changed the title 147. axios.post sends a GET request 147. axios.post but sent a GET request Jan 11, 2019
Repository owner locked and limited conversation to collaborators Jan 23, 2024
@ly525 ly525 converted this issue into discussion #641 Jan 23, 2024

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

Projects
None yet
Development

No branches or pull requests

1 participant