aboutsummaryrefslogtreecommitdiffstats
path: root/library/cpp/http/io/headers.h
diff options
context:
space:
mode:
authorAlexander Smirnov <alex@ydb.tech>2024-04-16 09:11:59 +0000
committerAlexander Smirnov <alex@ydb.tech>2024-04-16 09:11:59 +0000
commit25de1d521ca218e2b040739fea77a39e9fc543e9 (patch)
tree21521d8866cf1462dbd52c071cf369974c29650e /library/cpp/http/io/headers.h
parentbf444b8ed4d0f6bf17fd753e2cf88f9440012e87 (diff)
parent0a63d9ddc516f206f2b8745ce5e5dfa60190d755 (diff)
downloadydb-25de1d521ca218e2b040739fea77a39e9fc543e9.tar.gz
Merge branch 'rightlib' into mergelibs-240416-0910
Diffstat (limited to 'library/cpp/http/io/headers.h')
-rw-r--r--library/cpp/http/io/headers.h9
1 files changed, 7 insertions, 2 deletions
diff --git a/library/cpp/http/io/headers.h b/library/cpp/http/io/headers.h
index cfb4a9c054..3ae40683e2 100644
--- a/library/cpp/http/io/headers.h
+++ b/library/cpp/http/io/headers.h
@@ -1,9 +1,10 @@
#pragma once
+#include <util/generic/array_ref.h>
+#include <util/generic/deque.h>
#include <util/generic/string.h>
#include <util/generic/strbuf.h>
-#include <util/generic/deque.h>
-#include <util/generic/vector.h>
+#include <util/generic/vector.h> // XXX unused - remove after fixing transitive includes.
#include <util/string/cast.h>
class IInputStream;
@@ -65,6 +66,10 @@ public:
/// Добавляет каждую строку из потока в контейнер, считая ее правильным заголовком.
THttpHeaders(IInputStream* stream);
+ /// Создаёт контейнер из initializer-list'а или массива/вектора хедеров.
+ /// Пример: `THttpHeaders headers({{"Host", "example.com"}});`
+ THttpHeaders(TArrayRef<const THttpInputHeader> headers);
+
/// Стандартный итератор.
inline TConstIterator Begin() const noexcept {
return Headers_.begin();