PDA

View Full Version : QNetworkRequest works for HTTP, but not HTTPS



Rodrigo Alves
22nd November 2012, 00:58
So, I'm using a QNetworkRequest to get request from my website.

This is the code:


QNetworkRequest WebContact::getRequest()
{
QNetworkRequest request;
request.setUrl(QUrl(contactURL));
request.setHeader(QNetworkRequest::ContentTypeHead er,QVariant("application/x-www-form-urlencoded"));
return request;
}

When running on Qt Creator, the contactURL works perfectly both for HTTP and HTTPS.
However, when I compile and run outside Qt Creator, only the HTTP that works. Am I forgetting to add a library or something?

wysota
22nd November 2012, 04:16
Do you have OpenSSL libraries in your path?

Rodrigo Alves
24th November 2012, 08:38
Do you have OpenSSL libraries in your path?
I don't know.