HTTPRequest icon indicating copy to clipboard operation
HTTPRequest copied to clipboard

HTTPS Support

Open pmehul55 opened this issue 5 years ago • 6 comments

Thanks for the wonderful sample. Can you please tell me how I can use HTTPS scheme ?

pmehul55 avatar Oct 09 '19 09:10 pmehul55

I had the same problem, I just removed the "if" statement that checked if it was "http" in the HTTPRequest.hpp and somehow it works ¯\_(ツ)_/¯

SpookySec avatar Aug 31 '20 11:08 SpookySec

I had the same problem, I just removed the "if" statement that checked if it was "http" in the HTTPRequest.hpp and somehow it works ¯_(ツ)_/¯

Can you tell me what line of code that statement is in? I can't find it

p.s. I found it, thanks

lnfin avatar Feb 27 '21 11:02 lnfin

yeah... it was line 600 haha

SpookySec avatar Feb 27 '21 11:02 SpookySec

I had the same problem, I just removed the "if" statement that checked if it was "http" in the HTTPRequest.hpp and somehow it works ¯_(ツ)_/¯

Removing the if isn't a solution. This client does not know how to speak SSL, so servers listening on 443/https will just close the connection.

rwhitcroft avatar Apr 11 '21 18:04 rwhitcroft

  • Firstly, this library is portable and very easy to use as it doesn't require any dependencies. However, to support HTTPS, you will need a dependency such as OpenSSL to provide crypto algorithms and abstractions for the TLS handshake, certificate verification, etc.
  • Any HTTPS implementation worth considering requires the verification of certificate authorities. Although each operating system has its own source of verified certificate authorities, there is no unified way to fetch them. Cross-platform libraries that support HTTPS, such as curl, use an external source of root certificates.

HTTPS support is NOT a matter of removing a a conditional statement in the code.

shlomnissan avatar Jul 01 '23 21:07 shlomnissan

That was 3 years ago!! I was 15 or 14 at the time and barely had any knowledge of how protocols actually worked, for me it was just an annoying line getting printed every time I tried sending a request.

I ended up forking it, removing that line, and went with it which worked fine for my use case back then.

Thanks for your replies everyone, and please don't mind my old comment 😅

SpookySec avatar Jul 03 '23 09:07 SpookySec