Twilio Studio HTTP发布请求标头

时间:2019-07-19 13:12:24

标签: twilio twilio-studio

我正在尝试使用Http Request窗口小部件,内容类型-application / json。我看不到添加请求标头以提供令牌的选项。此.Net代码获得成功响应:

        string str = "Hello Webservice";
        string url = "https://website.com/webserviceurl.php";
        HttpClient httpClient = new HttpClient();

        httpClient.DefaultRequestHeaders.Add("token", "xxxx");
        HttpResponseMessage response = await httpClient.PostAsync(url, new StringContent(str));

在Twilio Studio中,我尝试将内容类型设置为以url编码的形式,以便我可以将令牌添加为参数,但这没有用。我得到了500条回复。

有人做过吗?我已经寻求Twilio的支持,但我想在这里可能会很幸运。 谢谢

1 个答案:

答案 0 :(得分:0)

似乎我没有正确搜索,因为答案在这里:

twilio studio does not allow headers in http requests if the body is JSON

相关问题