vue-resource参数问题

clipboard.png

clipboard.png

为什么第一种方式就可以为请求添加参数,官方的第二种方法就是不能添加参数呢~~
求救~~~

阅读 4.8k
3 个回答
this.$http.get(url, { params: your_params })

Legacy web servers

If your web server can't handle requests encoded as application/json, you can enable the emulateJSON option. This will send the request as application/x-www-form-urlencoded MIME type, as if from an normal HTML form.

Vue.http.options.emulateJSON = true;
新手上路,请多包涵

搭车问下题主,解决跨域的问题直接添加"withCredentials: true"吗?

撰写回答
你尚未登录,登录后可以
  • 和开发者交流问题的细节
  • 关注并接收问题和回答的更新提醒
  • 参与内容的编辑和改进,让解决方法与时俱进
推荐问题