mirror of
https://gitlab.com/spaceti-app/integrations/common/server-sdk.git
synced 2026-07-12 14:30:39 +02:00
update network request
This commit is contained in:
parent
3f3af6cfa6
commit
6940cad69e
@ -20,13 +20,14 @@ Request::~Request()
|
||||
QNetworkRequest Request::networkRequest() const
|
||||
{
|
||||
QNetworkRequest request(QUrl(this->mUrl));
|
||||
|
||||
if ( !userName().isEmpty() && !password().isEmpty() )
|
||||
request.setRawHeader("Authorization", this->basicAuthorization().toUtf8());
|
||||
request.setHeader(QNetworkRequest::ContentTypeHeader, "application/json; charset=UTF-8");
|
||||
|
||||
if ( !userName().isEmpty() && !password().isEmpty() ) {
|
||||
request.setRawHeader("Authorization", this->basicAuthorization().toUtf8());
|
||||
}
|
||||
|
||||
if ( !token().isEmpty() ) {
|
||||
request.setRawHeader("Authorization", this->bearerAuthorization().toUtf8());
|
||||
request.setHeader(QNetworkRequest::ContentTypeHeader, "application/json; charset=UTF-8");
|
||||
}
|
||||
|
||||
// Enabled compression
|
||||
|
||||
@ -72,8 +72,6 @@ void SqliteTest::createTable_test()
|
||||
db.openSQLite(dbpath);
|
||||
QVERIFY(db.isOpen());
|
||||
|
||||
|
||||
|
||||
Names names;
|
||||
|
||||
// CREATE TABLE
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user