cpprestsdk icon indicating copy to clipboard operation
cpprestsdk copied to clipboard

Request HTTP2 Support

Open fcharlie opened this issue 8 years ago • 10 comments

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.

fcharlie avatar Feb 09 '18 01:02 fcharlie

@ras0219-msft Does cpprestsdk have a plan to support HTTP2

fcharlie avatar May 16 '18 01:05 fcharlie

I'm also really interested in HTTP 2 support

CyrilleBenard avatar Jun 19 '18 13:06 CyrilleBenard

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.

BillyONeal avatar Oct 18 '18 07:10 BillyONeal

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:

CyrilleBenard avatar Oct 18 '18 09:10 CyrilleBenard

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 .

grahamreeds avatar Oct 18 '18 11:10 grahamreeds

Any news on this?

madduci avatar Jul 16 '19 09:07 madduci

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?

piotr-walczak avatar Feb 14 '22 18:02 piotr-walczak

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 avatar Feb 15 '22 03:02 barcharcraz

@barcharcraz - thank you for the response!

piotr-walczak avatar Feb 15 '22 13:02 piotr-walczak