我有2个Lambda函数 - 一个产生报价,一个将报价转换为订单.我希望Order lambda函数调用Quote函数来重新生成引用,而不是仅从不受信任的客户端接收它.
我看到了我能想到的所有地方 - 但看不出我是如何进行链接或调用功能的......当然这存在!
我正在尝试使用Slack Custom命令,并且不太确定如何使用延迟消息,因为Yoda Speak External API需要3秒以上的响应时间.
我做了以下事情:
/Yoda
在我的情况下发送了slack命令并收到了reponse_url
.post
对响应URL 使用以下内容.Run Code Online (Sandbox Code Playgroud)$data_string = '{"response_type": "in_channel", "text":"Checking,please wait..."}' ; $chs = curl_init(); curl_setopt($chs, CURLOPT_URL, $response_url); curl_setopt($chs, CURLOPT_POST, true); curl_setopt($chs, CURLOPT_POSTFIELDS, $data_string); curl_setopt($chs, CURLOPT_SSL_VERIFYPEER, FALSE); curl_setopt($chs, CURLOPT_SSL_VERIFYHOST, FALSE); curl_setopt($chs, CURLOPT_RETURNTRANSFER, true); curl_setopt($chs, CURLOPT_POST, 1); curl_setopt($chs, CURLOPT_HTTPHEADER, array('Content-Type:application/json')); $results = curl_exec($chs);
Run Code Online (Sandbox Code Playgroud)$chsres = curl_init(); curl_setopt($chsres, CURLOPT_URL, "https://yoda.p.mashape.com/yoda?sentence=welcome+to+stack"); curl_setopt($chsres, CURLOPT_SSL_VERIFYPEER, FALSE); curl_setopt($chsres, CURLOPT_SSL_VERIFYHOST, FALSE); curl_setopt($chsres, CURLOPT_VERBOSE, true); curl_setopt($chsres, CURLOPT_TIMEOUT, 45); curl_setopt($chsres, CURLOPT_RETURNTRANSFER, true); curl_setopt($chsres, CURLOPT_HTTPHEADER, array('Content-Type:application/json', "X-Mashape-Key:> …