Open JoseExposito opened 10 years ago
Unfortunately I don't know.
Akos Polster http://quantisproject.com
On 20 Nov 2013, at 18:46, José Expósito notifications@github.com wrote:
First I have to say that I'm using this library in a slightly weird way. I'm storing the consumer secret/key and the token/token secret in my DB and creating an O1 object using this code:
O1 AbstractMessage::createO1() { O1 oauth = new O1(this); oauth->setClientId(loginInfo->consumerKey); oauth->setClientSecret(loginInfo->consumerSecret); oauth->setToken(loginInfo->token); oauth->setTokenSecret(loginInfo->tokenSecret); return oauth; }
QNetworkReply AbstractMessage::oauthGetRequest(const QString &url) { O1 oauth = this->createO1(); O1Requestor *requestor = new O1Requestor(this->networkAccessManager, oauth, this); return requestor->get(QNetworkRequest(url), QList
()); } I don't know if this can cause the error. Calling to "oauthGetRequest()" with a URL like "https://one.ubuntu.com/api/file_storage/v1/~/foo" works like a charm.
However, when I try to do exactly the same with this URL "https://one.ubuntu.com/api/file_storage/v1/~/foo%20bar" or this other "https://one.ubuntu.com/api/file_storage/v1/~/foo?include_children=true" I'm getting a "Host requires authentication" error.
Could be this a problem with the way I'm using the library or could it be a bug?
— Reply to this email directly or view it on GitHub.
First I have to say that I'm using this library in a slightly weird way. I'm storing the consumer secret/key and the token/token secret in my DB and creating an O1 object using this code:
I don't know if this can cause the error.
Calling to "oauthGetRequest()" with a URL like "https://one.ubuntu.com/api/file_storage/v1/~/foo" works like a charm.
However, when I try to do exactly the same with this URL "https://one.ubuntu.com/api/file_storage/v1/~/foo%20bar" or this other "https://one.ubuntu.com/api/file_storage/v1/~/foo?include_children=true" I'm getting a "Host requires authentication" error.
Could be this a problem with the way I'm using the library or could it be a bug?