Skip to content

Instantly share code, notes, and snippets.

@ebongzzang
Created April 21, 2017 12:43
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ebongzzang/09c7a775cd6ccd5a4020abdaa75161c0 to your computer and use it in GitHub Desktop.
Save ebongzzang/09c7a775cd6ccd5a4020abdaa75161c0 to your computer and use it in GitHub Desktop.
KakaoTalk Bot using C++ REST SDK(casablanca)
#include "MessageListener.h"
#include <unistd.h>
int main(void)
{
utility::string_t address = ("http://localhost:8082/message");
uri_builder uri(address);
auto addr = uri.to_uri().to_string();
MessageListener * msg = new MessageListener(addr);
try
{
msg->open().wait();
}
catch(const std::exception &e)
{
printf("Error exception:%s\n", e.what());
}
pause();
msg->close().wait();
return 0;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment