Skip to content

Commit

Permalink
Update NotificationPushsafer.cpp
Browse files Browse the repository at this point in the history
  • Loading branch information
appzer authored Sep 19, 2016
1 parent f5d98dd commit 27a2f38
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions notifications/NotificationPushsafer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -21,15 +21,15 @@ bool CNotificationPushsafer::SendMessageImplementation(const std::string &Subjec

bool bRet;
std::string sResult;
std::string sPostData;
std::stringstream sPostData;
std::vector<std::string> ExtraHeaders;

sPostData << "k=" << _apikey << "&t=" << cSubject << "&m=" << Text;

//Add the required Access Token and Content Type
ExtraHeaders.push_back("Content-Type: application/x-www-form-urlencoded");

bRet = HTTPClient::POST("https://www.pushsafer.com/api",sPostData,ExtraHeaders,sResult);
bRet = HTTPClient::POST("https://www.pushsafer.com/api",sPostData.str(),ExtraHeaders,sResult);
bool bSuccess = (sResult.find("\"success\":") != std::string::npos);
if (!bSuccess)
_log.Log(LOG_ERROR, "Pushsafer: %s", sResult.c_str());
Expand Down

0 comments on commit 27a2f38

Please sign in to comment.