Does http protocol version “HTTP/1.1” include http

2020-07-16 02:52发布

问题:

I actually don't see this question already asked, perhaps because it is so basic.

I'm working with Java Apache httpcomponent, and inspecting the return of:

HttpResponse response.getStatusLine() returns:

HTTP/1.1 200 OK

I made the Apache HttpPost = new HttpPost("https://login.blah.com/etc");

Does this mean that I successfully am using Https with this connection (ie, my connection has successfully used HTTPS and not regular HTTP) ?

Thanks

回答1:

Yes.

HTTP and HTTPS are from the content that is being sent on application level indiferrent.

HTTPS is basically HTTP through a TLS tunnel.

So when the connection is established it is HTTPS.



标签: java apache http