Newer
Older
/********************************************************************************************
* *
* Copyright (C) 2017 Armin Felder, Dennis Beier *
* This file is part of RocketChatMobileEngine <https://git.fairkom.net/chat/fairchat>. *
* *
* RocketChatMobileEngine is free software: you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
* the Free Software Foundation, either version 3 of the License, or *
* (at your option) any later version. *
* *
* RocketChatMobileEngine is distributed in the hope that it will be useful, *
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
* GNU General Public License for more details. *
* *
* You should have received a copy of the GNU General Public License *
* along with RocketChatMobileEngine. If not, see <http://www.gnu.org/licenses/>. *
* *
********************************************************************************************/
RestRequest::RestRequest( const QByteArray &pData, const QString &pPath, RestRequest::methods pMethod, const RestRequestCallback &pSuccess )
setContent( pData );
setMethod( pMethod );
setPath( pPath );
setSuccess( pSuccess );
RestRequest::RestRequest( const QByteArray &pData, const QString &pPath, RestRequest::methods pMethod, const RestRequestCallback &pSuccess, const RestRequestCallback &pError )
setContent( pData );
setMethod( pMethod );
setPath( pPath );
setSuccess( pSuccess );
setError( pError );
}
RestRequest::methods RestRequest::getMethod() const
{
return mMethod;
}
void RestRequest::setMethod( const methods &pValue )
{
mMethod = pValue;
}
QString RestRequest::getPath() const
{
return mPath;
}
void RestRequest::setPath( const QString &pValue )
{
mPath = pValue;
}
QByteArray RestRequest::getContent() const
{
return mContent;
}
void RestRequest::setContent( const QByteArray &pValue )
{
mContent = pValue;
}
RestRequestCallback RestRequest::getSuccess() const
{
return mSuccess;
}
void RestRequest::setSuccess( const RestRequestCallback &pValue )
{
mSuccess = pValue;
}
RestRequestCallback RestRequest::getError() const
{
return mError;
}
void RestRequest::setError( const RestRequestCallback &pValue )
{
mError = pValue;
}
RestRequest::RestRequest()
{
}
bool RestRequest::getAbsolutePath() const
{
return mAbsolutePath;
}
QString RestRequest::getMimeType() const
{
return mMimeType;
}
void RestRequest::setMimeType( const QString &pValue )
{
mMimeType = pValue;
}
bool RestRequest::isRawData()
{
return mRawData;
}