Skip to content

Conversation

@dignifiedquire
Copy link
Member

@dignifiedquire dignifiedquire commented Mar 2, 2020

  • Switches to uses http-types
  • Implement client using async-h1
  • Currently this breaks the isahc client, as isahc::Body is not Sync


client::connect(stream, req).await
}
_ => unreachable!(),
Copy link
Member

Choose a reason for hiding this comment

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

We probably should return an error here instead.

Suggested change
_ => unreachable!(),
_ => http_types::bail!("Unsupported protocol prefix"),

@goto-bus-stop
Copy link
Member

isahc 0.9 will make isahc::Body impl Sync 🎉 sagebind/isahc@7c3955f

@yoshuawuyts
Copy link
Member

And it's been merged! sagebind/isahc#172 (comment)

@dignifiedquire
Copy link
Member Author

Unfortunately that was not enough. isahc::Body only implements AsyncRead, whereas http-types::Body requires AsyncBufRead to be implemented.

Thoughts @yoshuawuyts

@dignifiedquire
Copy link
Member Author

Figured it out, using async_std::io::BufReader it now works.

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

Successfully merging this pull request may close these issues.

3 participants