stream.fetch,增加一个headers的属性报405错误,method显示Options,
stream.fetch({
method: 'GET',
url: `${baseURL}/${path}`,
type: 'json',
headers: {
Authorization: 'ssssssss'
}
}, (response) => {
if (response.status == 200) {
resolve(response)
}
else {
reject(response)
}
}, () => {})
请求之后request header 会出现这两个参数 Access-Control-Request-Headers:authorization Access-Control-Request-Method:GET 最后报405错误,request method是Options非法的,如果headers没设置就不会出错
这个问题解决了吗?我也遇到了同样的问题
hi @1021727984 @BigBigWen Web/iOS/Android 哪个端上出现了这个问题
headers -> header is fine ! @BigBigWen @1021727984
你抓包看下你请求头 method 是不是 Option? 如果是 GET 说明服务器接收参数有问题。另外你看下请求头里的参数有不符合预期的么?
This PR/issue doesn't received response since Weex migrated to Apache two years ago and this repository is no longer active yet.
Feel free to ask question in new repository and thanks for your contribution.
This issue is outdated for a long time and will be closed now. You can create a new one if you still have questions.