2020-05-02 07:31:03 +00:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include <string>
|
|
|
|
|
|
|
|
class HttpResponse
|
|
|
|
{
|
|
|
|
|
|
|
|
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;
|
2022-05-18 07:42:44 +00:00
|
|
|
|
|
|
|
private:
|
|
|
|
std::string mHttpVersion;
|
|
|
|
std::string mResponseCode;
|
|
|
|
std::string mContentType;
|
|
|
|
std::string mBody;
|
2020-05-02 07:31:03 +00:00
|
|
|
};
|