How to send http request with PyQt?
<p>I want to send http GET request using PyQt.</p>

<p>Despite my researches, I haven't found any examples of that simple manipulation in python.</p>

<p>I've ended up with some code (that I have modified according to the hints given by Bakuriu in the comments), but it doesn't work. Let's say I want to make a get request to facebook webpage, and print the answer, which should be the HTML content of the page.</p>

<pre><code>from PyQt4 import QtCore, QtNetwork, QtCore, QtGui
from PyQt4.QtCore import *
import sys
from functools import partial

def printContent():
    answerAsText = QString(replyObject.readAll())
    print answerAsText 

app = QtCore.QCoreApplication(sys.argv)

url = QtCore.QUrl("http://www.facebook.com")
request = QtNetwork.QNetworkRequest()
request.setUrl(url)
manager = QtNetwork.QNetworkAccessManager()

replyObject = manager.get(request)
replyObject.finished.connect(printContent)

sys.exit(app.exec_())
</code></pre>

<p>This doesn't raise any error, it just doesn't print anything. 
I don't know where the problem is : 
Is my request wrong ? 
Or is it the way I handle the reply object afterwards ?</p>

<p>Why doesn't it work ? Could somebody please show me a functioning code ? </p>