From 6dd3a9e9f88d7ef36707dad09f16685944aa182c Mon Sep 17 00:00:00 2001 From: Angelo Mantellini Date: Sat, 23 Mar 2019 11:02:05 +0100 Subject: Pass the header to the hicn request Change-Id: Ic78d0c6247aafe8ceda0e939279e71369268b8cb Signed-off-by: Angelo Mantellini --- Input/ICNConnectionConsumerApi.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Input/ICNConnectionConsumerApi.cpp b/Input/ICNConnectionConsumerApi.cpp index f983a054..a7f52b44 100644 --- a/Input/ICNConnectionConsumerApi.cpp +++ b/Input/ICNConnectionConsumerApi.cpp @@ -142,8 +142,11 @@ int ICNConnectionConsumerApi::Read(uint8_t *data, size_t len) { if(!res) { + std::map headers = {{"Host", "localhost"}, + {"User-Agent", "higet/1.0"}, + {"Connection", "Keep-Alive"}}; std::string s(m_name.c_str()); - hTTPClientConnection->get(s); + hTTPClientConnection->get(s, headers); response = hTTPClientConnection->response(); this->res = true; this->dataPos = 0; -- cgit 1.2.3-korg