-
Notifications
You must be signed in to change notification settings - Fork 366
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
Adding a factory method to create a request/response (http package) from a request/response (io package) #8
Comments
Do you mean Regardless, I don't think this functionality is useful enough to bake in. It's pretty easy to do the wrapping yourself, if you want, but most of the benefit of this API over |
What do you mean it's only for client side? Taken from the README
import 'package:http/http.dart' as http;
var url = "http://example.com/whatsit/create";
http.post(url, body: {"name": "doodle", "color": "blue"})
.then((response) {
print("Response status: ${response.statusCode}");
print("Response body: ${response.body}");
});
http.read("http://example.com/foobar.txt").then(print); and what is the easy way of wrapping you were talking about? |
That code snippet is a request being made by an HTTP client. You can wrap by basically doing the same thing |
I think it could be cool to be able to create one of these when I'm using another framework that's using io.HttpResponse, I like the Future api you provide.
ie: using redstone.dart
The text was updated successfully, but these errors were encountered: