horse315 Posted June 7, 2010 Report Share Posted June 7, 2010 I can't find out why my request fails.(sorry some thing like port you can meet twice)) i didn't know what to to))))so:connecter.h#include <QtGui>#include <QtNetwork>#include <QDebug>#include <QAuthenticator>class connecter: public QWidget{ Q_OBJECTprivate: QHttp ht; QHttpRequestHeader Header; QAuthenticator Auth;public: connecter(QWidget *parent = 0);public slots: void smthDone(int, bool);};connecter.cpp#include "connecter.h"connecter::connecter(QWidget *parent):QWidget(parent){ connect(&ht, SIGNAL(requestFinished(int, bool)),this, SLOT(smthDone(int, bool))); ht.setUser("horse315","horsesbook"); // set name pass ht.setHost("192.168.1.2", QHttp::ConnectionModeHttp, quint16(7777)); qDebug() << ht.get(QUrl::toPercentEncoding("http://192.168.1.2:7777/gui/?list=1")); //!! GET REQUEST}void connecter::smthDone(int i, bool pp){ // it happens when request is finished qDebug() << "Ok"; qDebug() << ht.readAll(); // displays in debug terminal the reply}It returns "invalid request"...same thing i recieve in telnet making GET reques manualy.But in Fx or "wget http://horse315:horsesbook@192.168.1.2:7777/gui/?list=1"returns me right text.Help me please Link to comment Share on other sites More sharing options...
Lord Alderaan Posted June 8, 2010 Report Share Posted June 8, 2010 http://forum.utorrent.com/viewtopic.php?id=58111 Link to comment Share on other sites More sharing options...
horse315 Posted June 10, 2010 Author Report Share Posted June 10, 2010 My bab. Encoding to percent was wrong. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.