Testing post request with GroupMe Bot

夙愿已清 提交于 2019-12-12 02:45:55

问题


I just started building a GroupMe bot which i'm super excited about. I am using the GroupMe NodeJS Callback bot. I am currently running it locally with foreman start and everything works well but I cannot figure out how to test its responses. For example: I like to say "Hey guy" and see if the bot returns a response, such as "Im not your buddy guy." I was thinking a curl request but I am not sure where to start. Please help! (I will be around to answer question thanks!!)


回答1:


I figured out a way, even though it isn't ideal it works just fine. You need to open 2 terminals. The first will have the application running locally. The second you need to type:
curl -X POST -d '{"text" : "some_random_text", "bot_id" : "YOUR_BOT_ID"}' localhost:5000



来源:https://stackoverflow.com/questions/35518115/testing-post-request-with-groupme-bot

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!