使用GroupMe Bot测试发布请求 [英] Testing post request with GroupMe Bot

查看:79
本文介绍了使用GroupMe Bot测试发布请求的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我刚刚开始构建一个令我非常兴奋的GroupMe机器人.我正在使用GroupMe NodeJS回调机器人.我目前正在以领班开始本地运行它,并且一切正常,但是我无法弄清楚如何测试其响应.例如:我想说嘿家伙",看看机器人是否返回响应,例如我不是你的好友".我在考虑卷曲请求,但不确定从哪里开始.请帮忙! (我将在附近回答问题谢谢!!)

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!!)

推荐答案

我想出了一种方法,即使它并不理想,也可以正常工作.您需要打开2个终端.第一个应用程序将在本地运行.您需要输入的第二个字母:
curl -X POST -d '{"text" : "some_random_text", "bot_id" : "YOUR_BOT_ID"}' localhost:5000

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

这篇关于使用GroupMe Bot测试发布请求的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆