我创建了一个服务器,它正在侦听端口7000.我希望我的服务器可以使用函数void handle_post1()
来处理它收到的第一个msg,并使用void handle_post2()
来处理第二个http request
它收到。 like:如何使用不同的handle_post处理msg接收?(C++ REST SDK)
listener.support(methods::POST, handle_post1);//if this is the first msg I receive
listener.support(methods::POST, handle_post2);//if this is the second msg I receive
我试过这样的代码,但它不起作用。 我怎么能这样做?