vue - resource
发布日期:2022-03-11 15:03:39 浏览次数:10 分类:技术文章

本文共 603 字,大约阅读时间需要 2 分钟。

github地址:https://github.com/pagekit/vue-resource/blob/develop/docs/http.md

 

常用请求:

1. get请求: 格式 url?request=text

this.$http.get(url + text).then((response) => {
response = response.body; });

2. get请求: 格式 url?request={"start_page":xxx,"page_size":xxx}

this.$http({
method: 'get', url: globals.URL, params: {request: {start_page: 1,page_size:10}}, emulateJSON: true }).then((response) => {
response = respons.body; });

3. post请求: 

this.$http.post(url ,{name:'admin',password:'123'}).then((response) => {
response = response.body; });

转载于:https://www.cnblogs.com/m-blue/p/7218561.html

转载地址:https://blog.csdn.net/weixin_30267785/article/details/99188342 如侵犯您的版权,请留言回复原文章的地址,我们会给您删除此文章,给您带来不便请您谅解!

上一篇:strong vs copy
下一篇:Remoting IIS 发布

发表评论

最新留言

逛到本站,mark一下
[***.202.152.39]2024年04月08日 17时54分56秒