Closed
Description
Version
3.0.0-beta.5
Reproduction link
https://github.com/Rayraegah/cli-error-axios
Steps to reproduce
- Configure a proxy under devServer in vue.config.js (e.g. '/gists' : 'https://api.github.com')
- Use Axios to send a POST (.e.g. axios.post('/gists/...'))
- Use Axios to send a GET (.e.g. axios.get('/gists/...'))
- Repeat using fetch instead of Axios (same errors)
What is expected?
The axios post request should be proxied to https://api.github.com
like GET
requests do. Sometimes the GET
requests are not proxied.
What is actually happening?
The axios request goes to https://localhost:8080/gists/...
instead of https://api.github.com/gists
The issue is the same as the one in create-react-app
that was resolved recently.
refer: facebook/create-react-app#3726 and facebook/create-react-app#3311
On my main repo, GET requests were successful, only POST failed. But in the test repo - both GET and POST end in errors.
Activity
liyuanqiu commentedon Apr 22, 2018
@yyx990803 Why close this issue? You haven't resolved this problem yet. I think a
bug
tag is better than closing this issue.Rayraegah commentedon Apr 23, 2018
Just to clarify this was partially resolved in Beta-6 release.
PUT
andPOST
requests made via Axios are working but with fetch it is not.yyx990803 commentedon May 2, 2018
@liyuanqiu https://help.github.com/articles/closing-issues-using-keywords/
EryouHao commentedon Jul 3, 2018
@Rayraegah Has this problem been solved?