PUT not working with Http2Adapter
New Issue Checklist
- [x] I have searched for a similar issue in the project and found none
Issue Info
It looks like PUT is not working with the Http2Adapter.
I will get the following error:
HTTP/2 error: Stream error: Stream was terminated by peer (errorCode: 1)
I know of issue #486 in which I referenced dart-lang/http#1361 but as you can see I don't use headers in my example or my real code.
My code:
var d = Dio()
..httpClientAdapter = Http2Adapter(ConnectionManager(idleTimeout: 8000));
d.putUri(
Uri.parse("https://jsonplaceholder.typicode.com/posts/1"),
data: json.encode({"id": 1, "title": 'foo', "body": 'bar', "userId": 1}),
).then((response) async {
LOG.info(response);
}
This example is just a fake API which should also return data, but I get the same error using my own.
When I use DefaultHttpClientAdapter there is no problem.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. If this is still an issue, please make sure it is up to date and if so, add a comment that this is still an issue to keep it open. Thank you for your contributions.
Still an issue
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. If this is still an issue, please make sure it is up to date and if so, add a comment that this is still an issue to keep it open. Thank you for your contributions.
Still An Issue 🙃
#760
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. If this is still an issue, please make sure it is up to date and if so, add a comment that this is still an issue to keep it open. Thank you for your contributions.
I also face similar error with POST calls when using dio_http2_adapter
POST method has this issue as well.