Hello!
The follow code (qt c++)
QUrl url;
url.setScheme("https");
url.setHost("api.dropboxapi.com");
url.setPath("/2/file_requests/list_v2");
QUrlQuery params;
params.addQueryItem("limit", "1000");
QByteArray qb_params;
qb_params.append(params.toString(QUrl::FullyEncoded));
if(checkUrl(url)){
QNetworkRequest request; //
request.setUrl(url);
QByteArray auth;
auth.append(OAuth_);
auth.prepend("Bearer ");
request.setRawHeader("Authorization", auth);
request.setHeader(QNetworkRequest::ContentTypeHeader, "application/json");
manager->post(request, qb_params); //
}
got an error:
"Error transferring https://api.dropboxapi.com/2/file_requests/list_v2 - server replied: Bad Request"
"Error in call to API function \"file_requests/list:2\": request body: could not decode input as JSON"
What's wrong?