/home/barant/Development/BMA/server_core/ServerCore/Response.h
#ifndef __Response_h__
#define __Response_h__
#include "includes"
#include "Object.h"
namespace core {
class Response : public Object {
public:
enum Mode { LENGTH, STREAMING };
Response();
~Response();
std::string getResponse(Mode mode = LENGTH);
std::string getResponse(std::string content, Mode mode = LENGTH);
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
core::Response::setProtocol
void setProtocol(std::string protocol)
Definition: Response.cpp:30
core::Response::setText
void setText(std::string text)
Definition: Response.cpp:38
core::Response::getResponse
std::string getResponse(Mode mode=LENGTH)
Definition: Response.cpp:9
core::Response::Response
Response()
Definition: Response.cpp:6
core
Definition: Command.cpp:4
core::Response
Definition: Response.h:16
core::Response::setCode
void setCode(std::string code)
Definition: Response.cpp:34
core::Response::setMimeType
void setMimeType(std::string mimeType)
Definition: Response.cpp:42
core::Response::~Response
~Response()
Definition: Response.cpp:7
core::Object
Definition: Object.h:8