Skip to content

Connection closed before full header was received #274

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

Closed
onyas opened this issue May 10, 2019 · 0 comments
Closed

Connection closed before full header was received #274

onyas opened this issue May 10, 2019 · 0 comments

Comments

@onyas
Copy link

onyas commented May 10, 2019

Hi I have a dart file named http-example.dart, it has following content.

import 'package:http/http.dart' as http;
main(List arguments) async {
var url = "http://www.meizitu.com/";
var response = await http.get(url);
print(response.body.toString());
}

When I execute it through dart http-example.dart. It failed with following errors.

Unhandled exception:
Connection closed before full header was received
#0 IOClient.send (package:http/src/io_client.dart:65:7)
#1 BaseClient._sendUnstreamed (package:http/src/base_client.dart:169:38)
#2 BaseClient.get (package:http/src/base_client.dart:32:7)
#3 get. (package:http/http.dart:46:36)
#4 _withClient (package:http/http.dart:166:20)
#5 get (package:http/http.dart:46:5)
#6 main (package:beauty/utils/http-example.dart:11:24)
#7 _startIsolate. (dart:isolate-patch/isolate_patch.dart:298:32)
#8 _RawReceivePortImpl._handleMessage (dart:isolate-patch/isolate_patch.dart:171:12)

could you kindly help to check what's happened?

@onyas onyas closed this as completed May 10, 2019
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