[英]error : use 'application/json' Content-Type and raw POST with json data
The error message 错误消息
error : use 'application/json' Content-Type and raw POST with json data
错误:使用'application / json'Content-Type和带有json数据的原始POST
is being appeared from cyclos application inside plivo console which a third API that need to be integrated in cyclos through 正在从plivo控制台内的cyclos应用程序中出现,这是需要通过cyclos集成的第三个API
Gateway URL: https://api.plivo.com/v1/Account/auth-id/Message/
HTTP username:xxx
HTTP password: ****
HTTP headers
{
'content-type': 'application/json',
}
HTTP request type: POST
HTTP request POST body
{
"src":"+xxxx",
"dst":"+xxx",
"text":"some test"
}
Can you try sending header as 'Content-Type'
instead of 'content-type'
. 您可以尝试将标题发送为
'Content-Type'
而不是'content-type'
。
There are some implementations where field-names are case-sensitive (Like an age-old bug in PHP!). 有一些实现,其中字段名称区分大小写(就像PHP中一个古老的错误!)。
Just putting 只是把
Content-Type: application/json
inside http header field solved the issue. 里面的http header字段解决了这个问题。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.