In other words, if you want to make a HTTP GET request over a secure connection, you need to combine the two examples.
The links to the examples are http client and ssl client.
Let's see the difference between a HTTP client and a HTTPS client.
First, for the HTTP client the asio "flow", as per the http client example in the link above, is as follows:
- Resolve
- Connect
- Send request
- Receive response (process status, headers, body, etc.)
The application flow changes also:
- Resolve (use https for the resolve query)
- Certificate verification
- Connect
- SSL handshake (via async_handshake)
- Send request
- Receive response (process status, headers, body, etc.)
A full source code example of a HTTPS client is availale here: https://github.com/alexandruc/SimpleHttpsClient
Thanks! Very helpfull :)
ReplyDelete