Skip to content

Instantly share code, notes, and snippets.

@ebongzzang
Last active April 3, 2017 09:21
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/5235a88475eaf73d1fce446298a2995e to your computer and use it in GitHub Desktop.
Save ebongzzang/5235a88475eaf73d1fce446298a2995e to your computer and use it in GitHub Desktop.
KakaoTalk Bot using C++ REST SDK(casablanca)
#include "LazyListener.h"
LazyListener::LazyListener(utility::string_t url) : Listener::Listener(url)
{
}
void LazyListener::handle_get(http_request message)
{
json::value obj;
std::cout << message.to_string() << std::endl;
/* obj["type"] = web::json::value::string("buttons");
obj["buttons"] = web::json::value::array({web::json::value::string("Search Word"), web::json::value::string("Enter Yourself")});
*/
obj["type"] = json::value::string("text");
message.reply(status_codes::OK,obj);
}
void LazyListener::handle_post(http_request message)
{
}
void LazyListener::handle_put(http_request message)
{
}
void LazyListener::handle_delete(http_request message)
{
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment