Request HTTP2 Support
HTTP2 (rfc7540) has been released for nearly three years. But cpprestsdk not support HTTP2 still now.
In fact, WinHTTP, Httpsys, and HttpClient (Windows Runtime) now support HTTP2. CPPRESTSDK relies on these several components on Windows, so CPPRESTSDK can support HTTP2 on Windows
On Linux, MacOS cpprestsdk can use nghttp2 to support HTTP2. (CURL, Apache httpd, wget also use nghttp2 to support HTTP2).
WinHTTP
// HTTP2 support
DWORD dwOption = WINHTTP_PROTOCOL_FLAG_HTTP2;
if (!WinHttpSetOption(hSession,
WINHTTP_OPTION_ENABLE_HTTP_PROTOCOL,
&dwOption, sizeof(dwOption))) {
fprintf(stderr, "HTTP2 is not supported\n");
}
Thanks.
@ras0219-msft Does cpprestsdk have a plan to support HTTP2
I'm also really interested in HTTP 2 support
Not something we are planning to do anytime soon. Making it work with the asio backend would be the largest difficulty if WinHTTP indeed already has such support.
Thanks for your feedback. It's really a bad news for us 'cause we planned to use cpprestsdk (on Linux) and we hardly need to be compliant with HTTP2. This is a mandatory aspect in 5G applications :cry:
You are welcome to submit a pull request.
GR
Sent from my Nexus 6P
On Thu, 18 Oct 2018, 10:38 CyrilleBenard, [email protected] wrote:
Thanks for your feedback. It's really a bad news for us 'cause we planned to use cpprestsdk (on Linux) and we hardly need to be compliant with HTTP2. This is a mandatory aspect in 5G applications 😢
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/Microsoft/cpprestsdk/issues/697#issuecomment-430943382, or mute the thread https://github.com/notifications/unsubscribe-auth/AEy9nGd6M-li5bFvF-5nFNiroLfHyK0wks5umEwNgaJpZM4R_Tip .
@BillyONeal See: libnghttp2_asio: High level HTTP/2 C++ library
Any news on this?
Hi, was there any change in this regard? Maybe it would be possible to create some plan for http/2 support in terms of what needs to be done, so we could look for volunteers to contribute?
Given the fundamental problems with cpprestsdk's tasking model, and the amount of work it's pretty unlikely http/2 will be added (it would be a lot of code to review as well, if it were).
I'd really recommend looking at libcurl instead.
@barcharcraz - thank you for the response!