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

Difference between 'hyper' and 'hyper-h2' and support for Requests #390

Closed
iitns314 opened this issue Nov 14, 2016 · 2 comments
Closed

Difference between 'hyper' and 'hyper-h2' and support for Requests #390

iitns314 opened this issue Nov 14, 2016 · 2 comments

Comments

@iitns314
Copy link

Hi,
I'm implementing HTTP/2 client to send push notification request to APNS (token based)
And I'm on researching stage now, and I read an issue on hyper, which led me here.

I'm a bit confused differences between hyper and hyper-h2
I guess hyper-h2 is next version of hyper since @Lukasa shows up in both repositories,(hyper@github, hyper-h2@github) and I can find recent commits in hyper-h2 repository

Am I right? If not, are they intended different purpose?
(for example, hyper supports I/O things like requests whereas hyper-h2 doesn't but supports high-level interfaces)

In I/O part in hyper-h2 documentation it seems that hyper-h2 doesn't do I/O things so I need to implement writing/receiving data or utilize other network packages, such as twisted.

hyper supports Request Integration but hyper-h2 doesn't seem to.
My question is: is there any way that I can integrate hyper-h2 into requests for client side?

Since Best Practices for Managing Connections by Apple encourages using connection pool and requests supports it, It would be great hyper-h2 supports requests integration

Thank you in advance!

@Lukasa
Copy link
Member

Lukasa commented Nov 14, 2016

hyper-h2 is not the next version of hyper. It is instead a core part of hyper. If you do pip install hyper you will notice that pip installs a package called h2: that package is hyper-h2.

hyper-h2 is intended as a building block for HTTP/2 implementations. If you're trying to integrate with APNS then you can either use something like Twisted along with hyper-h2 to write an asynchronous APNS client, or you can use hyper along with something like Requests to write a synchronous one. Either way works.

TL;DR: hyper-h2 isn't replacing hyper, it's a part of hyper.

@Lukasa Lukasa closed this as completed Nov 14, 2016
@iitns314
Copy link
Author

Thank you for your explanation!

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

2 participants