/home/barant/Development/BMA/server_core/ServerCore/BMAResponse.h
#ifndef __BMAResponse_h__
#define __BMAResponse_h__
#include "includes"
#include "BMAObject.h"
class BMAResponse : public BMAObject {
public:
enum Mode { LENGTH, STREAMING };
BMAResponse();
~BMAResponse();
std::string getResponse(Mode mode);
std::string getResponse(std::string content, Mode mode);
void setProtocol(std::string protocol);
void setCode(std::string code);
void setText(std::string text);
void setMimeType(std::string mimeType);
void addHeaderItem(std::string key, std::string value);
private:
std::string protocol;
std::string code;
std::string text;
std::string mimeType;
std::string CRLF = "\r\n";
std::map<std::string, std::string> header;
};
#endif
BMAResponse::BMAResponse
BMAResponse()
Definition: BMAResponse.cpp:4
BMAResponse::setCode
void setCode(std::string code)
Definition: BMAResponse.cpp:32
BMAResponse::getResponse
std::string getResponse(Mode mode)
Definition: BMAResponse.cpp:7
BMAResponse
Definition: BMAResponse.h:14
BMAResponse::setMimeType
void setMimeType(std::string mimeType)
Definition: BMAResponse.cpp:40
BMAResponse::setText
void setText(std::string text)
Definition: BMAResponse.cpp:36
BMAObject
Definition: BMAObject.h:6
BMAResponse::setProtocol
void setProtocol(std::string protocol)
Definition: BMAResponse.cpp:28
BMAResponse::~BMAResponse
~BMAResponse()
Definition: BMAResponse.cpp:5