I have a problem geting application token for Microsoft translator with QNetworkAccessManager. This is my code:
QUrl serverUrl("https://datamarket.accesscontrol.windows.net/v2/OAuth2-13");
QNetworkRequest request(serverUrl);
request.setHeader(QNetworkRequest::ContentTypeHeader, "application/x-www-form-urlencoded");
QUrl postData;
postData.addQueryItem("grant_type", "client_credentials");
postData.addQueryItem("client_id", ClientID);
postData.addQueryItem("client_secret", ClientSecret);
postData.addQueryItem("scope", "http://api.microsofttranslator.com");
networkAccessManager->post(request, postData.encodedQuery());
and when a finished(QNetworkReply*) signal is emitted I found that server reply contains no data at all, it is just empty! Does anyone know the solution of this problem?
UPD I checked a reply for errors and got the following: "Error creating ssl context". So I added SSL libs to my project, but got next error - "Unknown error". Any ideas?