javaapachehttp

Does http protocol version "HTTP/1.1" include https?


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

I'm working with Apache HttpComponents library in Java, 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) ?


Solution

  • 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.