Pass the header to the hicn request 87/18487/1
authorAngelo Mantellini <[email protected]>
Sat, 23 Mar 2019 10:02:05 +0000 (11:02 +0100)
committerAngelo Mantellini <[email protected]>
Sat, 23 Mar 2019 10:02:05 +0000 (11:02 +0100)
Change-Id: Ic78d0c6247aafe8ceda0e939279e71369268b8cb
Signed-off-by: Angelo Mantellini <[email protected]>
Input/ICNConnectionConsumerApi.cpp

index f983a05..a7f52b4 100644 (file)
@@ -142,8 +142,11 @@ int        ICNConnectionConsumerApi::Read(uint8_t *data, size_t len)
 {
     if(!res)
     {
+       std::map<std::string, std::string> 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;