Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7609883
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T01:17:04+00:00 2026-05-31T01:17:04+00:00

I am calling a webservice using Http Post method and getting below text in

  • 0

I am calling a webservice using Http Post method and getting below text in response

HTTP/1061.1061 1061 (I have printed QHttpResponseHeader in debug)

but in actual case it should return error code or xml. so please tell me what i am doing wrong in following code

//.cpp file code 
 MainWindow::MainWindow(QWidget *parent)
: QMainWindow(parent), ui(new Ui::MainWindow)
{
  qDebug() << "start";
  http = new QHttp(this); // http declared as a member of MainWindow class
  connect(http, SIGNAL(requestFinished(int,bool)), SLOT(replyFinished(int, bool)));

  QByteArray data;//(QString("--" + boundary + "\r\n").toAscii());
  data += "Content-Disposition: form-data; name=\"action\"\r\n\r\n";

  data += "Content-Type: text/xml;charset=\"utf-8\"\r\n\r\n";

  data += QString("<LoginData><IMEI>test123</IMEI><email>a@a.com</email></LoginData>").toAscii();
  data += "\r\n";

  data += "Content-Disposition: form-data; name=\"description\"\r\n\r\n";

  data += "\r\n";

  QHttpRequestHeader header("Content-Type","application/soap+xml;charset=UTF-8");
  header.setValue("Host", "http://xxx.com/restwebservice/ForgotPassword.ashx?");
  header.setValue("Accept-Language", "en-us,en;q=0.5");
  header.setValue("Keep-Alive", "300");
  header.setValue("Connection", "keep-alive");
  header.setValue("Referer", "http://xxx.com/restwebservice/ForgotPassword.ashx?");

  qDebug() << "the sent data is :" + data;
  http->setHost("http://xxx.com/restwebservice/ForgotPassword.ashx?");
  http->request(header, data);

  ui->setupUi(this);
}

The slot method

void MainWindow :: replyFinished(int , bool)
{
    QHttpResponseHeader responce = http->lastResponse();
    qDebug()<<"reply is :" + responce.toString();
}
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-31T01:17:05+00:00Added an answer on May 31, 2026 at 1:17 am

    QHttp is deprecated and only still here for backward compatibility.

    For new code, you should use QNetworkAccessManager/QNetworkRequest/QnetworkReply (http://qt-project.org/doc/qt-4.8/QNetworkAccessManager.html#details)

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am using > http://www.weather.gov/forecasts/xml/DWMLgen/wsdl/ndfdXML.wsdl webservice to get the weather detials by calling GmlTimeSeries
I'm calling a webservice using the NuSoap PHP library . The webservice appears to
I have a problem. I am coding using VS2008. I am calling webservices from
I am calling a webservice and I am getting a complex object back. I
I am calling a webservice as follows.I have to display name, description and url
I have C# Client application calling Windows webservice written in WCF calling Sql Procedure
I'm calling a web service using jquery's ajax method and it seems to work
I have a submit button created in which I am calling a method call2
I want to invoke an ASP.NET web service via an http POST request using
I'm calling a method on a web service from behind a proxy server using

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.