Skip to content
New issue

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

按照教程, 使用flutter Dio伪造请求头, 请求失败, 提示 Refused to set unsafe header "host" #12

Open
drooop opened this issue Jul 19, 2020 · 0 comments

Comments

@drooop
Copy link

drooop commented Jul 19, 2020

网上查了资料,发现有人说现在请求头不能写某几个key?
然后看了Dio库里的Headers类,发现里面有默认支持的几个key

httpHeaders = {
Headers.acceptHeader: "application/json, text/plain, /",
Headers.contentEncodingHeader: "gzip, deflate, br, drop",
Headers.contentLengthHeader: '',
Headers.contentTypeHeader: 'application/json'
}

是不是除了这几个,其他的都不支持呢(比如'origin')

跪求解惑,拜托大家了

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

No branches or pull requests

1 participant