From 718e96a95c5596fa6c7e21984cf8bdfb6d528e60 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Wed, 26 Jun 2019 23:07:24 +0300 Subject: MQTT: proper MQTT payload preparation --- protocols/Facebook/src/http.cpp | 3 +++ 1 file changed, 3 insertions(+) (limited to 'protocols/Facebook/src/http.cpp') diff --git a/protocols/Facebook/src/http.cpp b/protocols/Facebook/src/http.cpp index aa2d4a5c5e..88a73c4006 100644 --- a/protocols/Facebook/src/http.cpp +++ b/protocols/Facebook/src/http.cpp @@ -107,6 +107,9 @@ AsyncHttpRequest* FacebookProto::CreateRequest(const char *szName, const char *s szLocale = "en"; pReq << CHAR_PARAM("locale", szLocale); + if (!m_szAuthToken.IsEmpty()) + pReq->AddHeader("Authorization", "OAuth " + m_szAuthToken); + pReq->AddHeader("Content-Type", "application/x-www-form-urlencoded; charset=utf-8"); unsigned int id; -- cgit v1.2.3