We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
1.项目使用端口号: 3000 2.代码中发起请求axios.get('/api/blackboardlist'), 实际使用端口号 3.在package.json配置{"proxy":"localhost:5000"}, 将请求从 localhost:3000/api/blackboardlist 代理为 localhost:5000/api/blackboardlist 向5000端口发出数据请求 4.Charles的"Proxy Settings"中配置"HTTP Proxy"的Port端口号为5000, 并勾选"Enable transparent HTTP proxying" 5."Tools" >>> "Map Local Settings" >>> "Add"添加映射 >>> 在Host中输入 localhost:5000/api/blackboardlist "Map To" >>> Local path >>> 在本地选择要映射的文件, 并勾选Case-sensitive "OK" >>> "OK" 6. 完成
正确 >>> [{"href": "/联系我们", "text": "联系我们"}] >>> [Object Array] 错误 >>> [{"href": "/联系我们", "text": "联系我们"},] >>> 不能识别类型, [Object Undefined]
The text was updated successfully, but these errors were encountered:
253867843
No branches or pull requests
Charles配置
1.项目使用端口号: 3000
![mock-0](https://user-images.githubusercontent.com/16665394/54412414-7f847b80-472d-11e9-81d2-11ba695d849e.png)
![mock-1](https://user-images.githubusercontent.com/16665394/54412438-9dea7700-472d-11e9-80a4-cab6e32c5721.png)
![mock-2](https://user-images.githubusercontent.com/16665394/54412444-a5aa1b80-472d-11e9-9d6a-345af9f76299.png)
![mock-3](https://user-images.githubusercontent.com/16665394/54412450-ab076600-472d-11e9-95f6-aef8338df5f7.png)
2.代码中发起请求axios.get('/api/blackboardlist'), 实际使用端口号
3.在package.json配置{"proxy":"localhost:5000"}, 将请求从
localhost:3000/api/blackboardlist
代理为
localhost:5000/api/blackboardlist
向5000端口发出数据请求
4.Charles的"Proxy Settings"中配置"HTTP Proxy"的Port端口号为5000,
并勾选"Enable transparent HTTP proxying"
5."Tools" >>> "Map Local Settings" >>> "Add"添加映射 >>> 在Host中输入
localhost:5000/api/blackboardlist
"Map To" >>> Local path >>> 在本地选择要映射的文件, 并勾选Case-sensitive
"OK" >>> "OK"
6. 完成
1.在写json时, 不要输入多余的","逗号.
正确 >>> [{"href": "/联系我们", "text": "联系我们"}] >>> [Object Array]
错误 >>> [{"href": "/联系我们", "text": "联系我们"},] >>> 不能识别类型, [Object Undefined]
The text was updated successfully, but these errors were encountered: