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

Add a dart:html client #83

Merged
merged 4 commits into from
May 25, 2017
Merged

Conversation

donny-dont
Copy link

@donny-dont donny-dont commented May 24, 2017

Adding the browser_client.dart implementation

@donny-dont
Copy link
Author

The responseUrl does not appear to need any modification. Its the absolute path from what I see in testing.

Future<StreamedResponse> send(BaseRequest request) async {
var bytes = await request.finalize().toBytes();
Future<Response> send(Request request) async {
var stream = new ByteStream(request.read());
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I really want to kill ByteStream, so we shouldn't use it here. You can pull this functionality into a function in utils/, although really it should live in a package somewhere.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It appears it IS in a package 👍

headers: xhr.responseHeaders,
reasonPhrase: xhr.statusText));
reasonPhrase: xhr.statusText,
body: new ByteStream.fromBytes(body),
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This also shouldn't be a ByteStream. In this case, just new Stream.fromIterable([body]) should work.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed

@donny-dont
Copy link
Author

@nex3 :shipit: ?

@nex3 nex3 merged commit 2168f61 into dart-lang:master May 25, 2017
@donny-dont donny-dont deleted the feature/browser-client branch May 25, 2017 00:22
@donny-dont
Copy link
Author

Nice! Another one down 😄

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

Successfully merging this pull request may close these issues.

3 participants