aboutsummaryrefslogtreecommitdiffstats
path: root/library/cpp/http/server/response.h
diff options
context:
space:
mode:
authorAnton Samokhvalov <pg83@yandex.ru>2022-02-10 16:45:17 +0300
committerDaniil Cherednik <dcherednik@yandex-team.ru>2022-02-10 16:45:17 +0300
commitd3a398281c6fd1d3672036cb2d63f842d2cb28c5 (patch)
treedd4bd3ca0f36b817e96812825ffaf10d645803f2 /library/cpp/http/server/response.h
parent72cb13b4aff9bc9cf22e49251bc8fd143f82538f (diff)
downloadydb-d3a398281c6fd1d3672036cb2d63f842d2cb28c5.tar.gz
Restoring authorship annotation for Anton Samokhvalov <pg83@yandex.ru>. Commit 2 of 2.
Diffstat (limited to 'library/cpp/http/server/response.h')
-rw-r--r--library/cpp/http/server/response.h26
1 files changed, 13 insertions, 13 deletions
diff --git a/library/cpp/http/server/response.h b/library/cpp/http/server/response.h
index 7880babac5..a75cb85605 100644
--- a/library/cpp/http/server/response.h
+++ b/library/cpp/http/server/response.h
@@ -1,8 +1,8 @@
#pragma once
-
+
#include <library/cpp/http/misc/httpcodes.h>
#include <library/cpp/http/io/stream.h>
-
+
#include <util/generic/strbuf.h>
#include <util/string/cast.h>
@@ -12,23 +12,23 @@ class IOutputStream;
class THttpResponse {
public:
THttpResponse() noexcept
- : Code(HTTP_OK)
- {
- }
-
+ : Code(HTTP_OK)
+ {
+ }
+
explicit THttpResponse(HttpCodes code) noexcept
: Code(code)
{
}
- template <typename ValueType>
+ template <typename ValueType>
THttpResponse& AddHeader(const TString& name, const ValueType& value) {
return AddHeader(THttpInputHeader(name, ToString(value)));
}
THttpResponse& AddHeader(const THttpInputHeader& header) {
Headers.AddHeader(header);
-
+
return *this;
}
@@ -38,8 +38,8 @@ public:
return Headers;
}
- THttpResponse& SetContentType(const TStringBuf& contentType);
-
+ THttpResponse& SetContentType(const TStringBuf& contentType);
+
/**
* @note If @arg content isn't empty its size is automatically added as a
* "Content-Length" header during output to IOutputStream.
@@ -47,7 +47,7 @@ public:
*/
THttpResponse& SetContent(const TString& content) {
Content = content;
-
+
return *this;
}
@@ -61,8 +61,8 @@ public:
* @see IOutputStream& operator << (IOutputStream&, const THttpResponse&)
*/
THttpResponse& SetContent(const TString& content, const TStringBuf& contentType) {
- return SetContent(content).SetContentType(contentType);
- }
+ return SetContent(content).SetContentType(contentType);
+ }
HttpCodes HttpCode() const {
return Code;