diff options
author | Alexander Smirnov <alex@ydb.tech> | 2024-04-16 09:11:59 +0000 |
---|---|---|
committer | Alexander Smirnov <alex@ydb.tech> | 2024-04-16 09:11:59 +0000 |
commit | 25de1d521ca218e2b040739fea77a39e9fc543e9 (patch) | |
tree | 21521d8866cf1462dbd52c071cf369974c29650e /library/cpp/http/io/headers.h | |
parent | bf444b8ed4d0f6bf17fd753e2cf88f9440012e87 (diff) | |
parent | 0a63d9ddc516f206f2b8745ce5e5dfa60190d755 (diff) | |
download | ydb-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.h | 9 |
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(); |