Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

format of a https get request

Tags:

http

https

format of a https get request

I was trying to implement a HTTPS get request.

This is my sample HTTP get request.

GET example.com HTTP/1.1
Date: Mon, 22 Feb 1857 12:27:07 GMT
Host: xyz.com:5901
User-Agent:
Content-Length:  0

I have used SSL library to encrypt the message, but is there anyway to differentiate a HTTP message and https message with the request? Right now I have put a condition to call the SSL library, but I havent found any example where http request varies from https request.

Can anyone guide me here.

like image 245
user1692342 Avatar asked Feb 03 '26 22:02

user1692342


1 Answers

HTTPS is HTTP over SSL/TLS. Essentially, the SSL/TLS connection is initiated by the client. Once the SSL/TLS connection is established, it's just like normal HTTP. As the RFC says:

Conceptually, HTTP/TLS is very simple. Simply use HTTP over TLS precisely as you would use HTTP over TCP.

like image 59
Bruno Avatar answered Feb 06 '26 14:02

Bruno