sony / easyhttpcpp

A cross-platform HTTP client library with a focus on usability and speed
MIT License
163 stars 29 forks source link

Https client sample ?? #11

Closed tech-a-go-go closed 4 years ago

tech-a-go-go commented 4 years ago

Hi there,

I'm interested in this library but couldn't find any samples of HTTPs (SSL) client in this repository and on the web.

Do you guys have any plans to provide ? or any hints or tips ??

Cheers

sharma1981 commented 4 years ago

Hi Even i am trying to build easyHTTP on windows. Somehow i was able to build BUT when i tried to execute the SimpleHttpClient sample with URL as https://github.com/sony/easyhttpcpp on visual studio, then i am getting error as below. However the same sample works fine on CentOS7 with same HTTPS url. With a HTTP URL, it works OK on windows as well as linux

The log for failure on windows with HTTPS url is as below HTTP GET url: https://github.com/sony/easyhttpcpp 2020/03/13 09:54:18 [24588:0] EASYHTTPCPP_ConnectionPoolInternal LogLv=D line=29 create. this=[0000020431087390] 2020/03/13 09:54:18 [24588:0] EASYHTTPCPP_HttpEngine LogLv=D line=216 request is available to cache. 2020/03/13 09:54:18 [24588:0] EASYHTTPCPP_HttpFileCache LogLv=D line=58 getMetadata key=8eb111c0a444d06eb058fd352c3d162aa880841d 2020/03/13 09:54:18 [24588:0] EASYHTTPCPP_LruCacheByDataSizeStrategy LogLv=D line=110 get: not found key. [8eb111c0a444d06eb058fd352c3d162aa880841d] 2020/03/13 09:54:18 [24588:0] EASYHTTPCPP_HttpFileCache LogLv=D line=61 getMetadata : [8eb111c0a444d06eb058fd352c3d162aa880841d] not found in cache. 2020/03/13 09:54:18 [24588:0] EASYHTTPCPP_CacheManager LogLv=D line=38 Cache[1] getMetadata : not found. 2020/03/13 09:54:18 [24588:0] EASYHTTPCPP_HttpCacheInternal LogLv=D line=122 cache not found. 2020/03/13 09:54:18 [24588:0] EASYHTTPCPP_ConnectionPoolInternal LogLv=D line=104 create HTTPSClientSession. 2020/03/13 09:54:18 [24588:0] EASYHTTPCPP_ConnectionInternal LogLv=D line=32 create this=[0000020431D6EB00] url=[https://github.com/sony/easyhttpcpp] 2020/03/13 09:54:18 [24588:0] EASYHTTPCPP_ConnectionPoolInternal LogLv=D line=139 createConnection: insert connection=[0000020431D6EB00] 2020/03/13 09:54:18 [24588:0] EASYHTTPCPP_HttpEngine LogLv=D line=419 Poco HTTPRequest: 2020/03/13 09:54:18 [24588:0] EASYHTTPCPP_HttpEngine LogLv=D line=420 method=GET 2020/03/13 09:54:18 [24588:0] EASYHTTPCPP_HttpEngine LogLv=D line=446 sendRequest: SSL exception. [scheme=https, host=github.com] message=[Error during handshake: The function requested is not supported] 2020/03/13 09:54:18 [24588:0] EASYHTTPCPP_HttpEngine LogLv=D line=297 sendRequestAndReceiveResponseWithRetryByConnection: other HttpException. [EASYHTTPCPP-ERR-100704: SSL error occurred in sendRequest. [scheme=https, host=github.com] message=[Error during handshake: The function requested is not supported]] 2020/03/13 09:54:18 [24588:0] EASYHTTPCPP_ConnectionPoolInternal LogLv=D line=162 removeConnectionWithoutLock: removed Connection from ConnectionPool. connection=[0000020431D6EB00] 2020/03/13 09:54:18 [24588:0] EASYHTTPCPP_QueuedThreadPool LogLv=D line=131 shutdown was executed 2020/03/13 09:54:18 [24588:0] EASYHTTPCPP_QueuedThreadPool LogLv=D line=152 shutdownAndJoinAll was executed Error occurred: EASYHTTPCPP-ERR-100704: SSL error occurred in sendRequest. [scheme=https, host=github.com] message=[Error during handshake: The function requested is not supported]

tech-a-go-go commented 4 years ago

@sharma1981

However the same sample works fine on CentOS7 with same HTTPS url.

Serious !? I will try tonight.

Thanks

tech-a-go-go commented 4 years ago

@sharma1981

It worked pretty well !!

Thank you