We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
dio: ^0.1.7
Access the HTTP address error FormatException: Bad utf-8 encoding 0x89, the correct return content of HTTP is binary
try { Response responses = await DioUtils.DioHttp().post(url, data: formData); print('返回:${responses.data.toString()}'); }on DioError catch(e){ print('错误:'+e.message); }
错误:FormatException: Bad UTF-8 encoding 0x89 (at offset 0)
The text was updated successfully, but these errors were encountered:
你formdata中的内容和url分别是什么?
From gitme Android
Sorry, something went wrong.
@wendux FormData formData = new FormData.from({ "token": token, "nonce": nonce8, "timestamp": time.toString(), "sign": sign, }); {token: v6b3aSqLJp6YpWmnWvuCip7W, nonce: BMnMKZXE, timestamp: 1533005903, sign: ea9efa98cf29e992db8b1ce9138ee6a26313e43ee67f9ef6bd900408efc95864}
url = Constants.api + "/GetVerify" 接口返回的是二进制图片,其实的接口都正常就这个不行,这个接口在java代码上是正常的
二进制数据要指定responseType为stream , 这样response.data便会是steam, dio默认是以字符串方式来解码的
Update CODEOWNERS (#44)
fc0ac4b
Signed-off-by: Alex Li <github@alexv525.com> Signed-off-by: Alex Li <github@alexv525.com>
No branches or pull requests
dio: ^0.1.7
Access the HTTP address error FormatException: Bad utf-8 encoding 0x89, the correct return content of HTTP is binary
错误:FormatException: Bad UTF-8 encoding 0x89 (at offset 0)
The text was updated successfully, but these errors were encountered: