stuff-from-scratch/src/core/http/HttpResponse.h

27 lines
382 B
C
Raw Normal View History

2020-05-02 07:31:03 +00:00
#pragma once
#include <string>
class HttpResponse
{
2021-03-29 20:31:24 +00:00
std::string mHttpVersion;
std::string mResponseCode;
std::string mContentType;
std::string mBody;
2020-05-02 07:31:03 +00:00
public:
2021-03-29 20:31:24 +00:00
HttpResponse();
2020-05-02 07:31:03 +00:00
2021-03-29 20:31:24 +00:00
~HttpResponse();
2020-05-02 07:31:03 +00:00
2021-03-29 20:31:24 +00:00
void SetBody(const std::string& body);
2020-05-02 07:31:03 +00:00
2021-03-29 20:31:24 +00:00
unsigned GetBodyLength() const;
2020-05-02 07:31:03 +00:00
2021-03-29 20:31:24 +00:00
std::string GetHeaderString() const;
2020-05-02 07:31:03 +00:00
2021-03-29 20:31:24 +00:00
std::string ToString() const;
2020-05-02 07:31:03 +00:00
};