Skip to content
This repository has been archived by the owner on Dec 1, 2023. It is now read-only.

this.$http.delete 无法使用application/x-www-form-urlencoded #619

Open
wangxiaoyao opened this issue Jun 5, 2017 · 1 comment
Open

Comments

@wangxiaoyao
Copy link

                        this.$http.delete(this.deleteProductUrl, {
				ids: goodsId
			}, {
				"Content-Type": "application/x-www-form-urlencoded"
			}, {
				emulateJSON: true
			}).then((response) => {
				alert(response.data.reason)
			})

但是在控制台查看头部信息:

怎样使用参数请选择 body(主体) x-www-form-urlencoded 进行传递参数?

@lc-soft
Copy link

lc-soft commented Jul 27, 2017

Please check your params:

this.$http.delete(url, [options]).then(xxxx)

this.$http.delete(this.deleteProductUrl, {
  params: {
    ids: goodsId
  },
  emulateJSON: true
}).then((response) => {
  alert(response.data.reason)
})

https://github.com/pagekit/vue-resource/blob/develop/docs/http.md#methods

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants