Hi, I am trying to use the http connection request response.. to connect it with my server....im trying to post the content which is in json format.... mt request hits the server but the response is as follows..
Server replied - not acceptable.
this is my code which i used to send request to the server.
QByteArray postData("");
QList<QPair<QByteArray, QByteArray> > headers;
if (!HttpCommunicator::splitIntoHeaders("application/json",
headers)) {
ui->m_textBrowserResp->setText(tr("Failed to parse HTTP headers."));
return;
}
HttpCommunicator::HttpRequestType requestType = HttpCommunicator::httpRequestTypeForText(
"POST");
m_httpCommunicator = new HttpCommunicator(requestType,"URl which i am posting",
"data which i want to post", headers, "True");
I can understand that the prob is because of the headers which i am passing... can anyone tell me wats the prob with these headers ???? wat i want to change to solve the problem... thanks for any replies..