Results 1 to 3 of 3

Thread: QNetworkRequest works for HTTP, but not HTTPS

  1. #1
    Join Date
    Nov 2012
    Posts
    5
    Thanked 1 Time in 1 Post
    Qt products
    Qt4
    Platforms
    Windows

    Default QNetworkRequest works for HTTP, but not HTTPS

    So, I'm using a QNetworkRequest to get request from my website.

    This is the code:

    Qt Code:
    1. QNetworkRequest WebContact::getRequest()
    2. {
    3. QNetworkRequest request;
    4. request.setUrl(QUrl(contactURL));
    5. request.setHeader(QNetworkRequest::ContentTypeHeader,QVariant("application/x-www-form-urlencoded"));
    6. return request;
    7. }
    To copy to clipboard, switch view to plain text mode 

    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?

  2. #2
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: QNetworkRequest works for HTTP, but not HTTPS

    Do you have OpenSSL libraries in your path?
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


  3. #3
    Join Date
    Nov 2012
    Posts
    5
    Thanked 1 Time in 1 Post
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: QNetworkRequest works for HTTP, but not HTTPS

    Quote Originally Posted by wysota View Post
    Do you have OpenSSL libraries in your path?
    I don't know.

Similar Threads

  1. Create QNetworkRequest from QString(http headers)
    By davidpmp in forum Qt Programming
    Replies: 1
    Last Post: 9th December 2011, 22:45
  2. HTTP Post issue, HTML Works , QT Does Not,
    By georgeky in forum Newbie
    Replies: 8
    Last Post: 10th September 2011, 13:51
  3. Replies: 3
    Last Post: 6th July 2011, 06:59
  4. Replies: 10
    Last Post: 12th September 2010, 19:16
  5. Replies: 0
    Last Post: 3rd August 2010, 09:07

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.