Skip to content
This repository has been archived by the owner on Nov 9, 2017. It is now read-only.

Api module for libhttp's client #14

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

flaper87
Copy link

This PR depends on #23

}

content
}
Copy link
Owner

Choose a reason for hiding this comment

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

This whole get_content method is superfluous: std::rt::io::extensions::ReaderUtil.read_to_end() does exactly that, though as ~[u8] instead of ~str. (Given the response may not be UTF-8 encoded, this is the most sensible thing to do anyway. Correct encoding interpretation for at least HTML will come later; another—I can't remember who—is already developing at least part of it.)

Copy link
Author

Choose a reason for hiding this comment

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

mmh, I didn't know there's a read_to_end method. Thanks for pointing it out.

P.S: Don't assume I know everything about Rust, I'm still discovering things from the stdlib 😄

@flaper87
Copy link
Author

Hey, @chris-morgan I'll cleanup this code and resubmit the PR. Can I get your thoughts around the API? I'd like to keep this work going.

metajack added a commit to metajack/rust-http that referenced this pull request Aug 9, 2014
…ranch

Update the servo branch with changes from upstream and to build in Servo
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants