#include "restrequest.h"

RestRequest::RestRequest(QByteArray pData,QString pPath, RestRequest::methods pMethod,RestRequestCallback pSuccess)
{
    setContent(pData);
    setMethod(pMethod);
    setPath(pPath);
    setSuccess(pSuccess);
}

RestRequest::RestRequest(QByteArray pData,QString pPath, RestRequest::methods pMethod,RestRequestCallback pSuccess, 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;
}