Commit 9a7d6c03 by 李定达

1.增加http请求头Authorization

parent efb78a9d
No preview for this file type
......@@ -992,11 +992,13 @@ int SendMsg(const std::string &text, const string &url, int iscret)
}
headers = curl_slist_append(headers, "Content-Type:application/json;charset=utf-8");
headers = curl_slist_append(headers, "Accept:application/json");
headers = curl_slist_append(headers, "Authorization:dXBzLWNsaWVudDo2VGk4TjBXNzRyb1A=");
}
else
{
headers = curl_slist_append(headers, "Content-Type:text;charset=utf-8");
headers = curl_slist_append(headers, "Accept:text");
headers = curl_slist_append(headers, "Authorization:dXBzLWNsaWVudDo2VGk4TjBXNzRyb1A=");
}
curl_easy_setopt(curl, CURLOPT_URL, url.c_str());
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment