简体   繁体   English

错误:使用'application / json'Content-Type和带有json数据的原始POST

[英]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.

相关问题 JAX-RS:使用 JSON POST 数据而不将 Content-Type 标头设置为 application/json - JAX-RS: Consuming JSON POST data without setting Content-Type header to application/json 将表单数据部分中的 Content-Type 指定为 application/json - Specify Content-Type in form-data part as application/json 没有为Content-Type定义解析器:application / json - No parser defined for Content-Type: application/json 在 Spring 中读取 Content-Type 应用程序/json - Reading Content-Type application/json in Spring MVC-当自定义内容类型时接受JSON(不是application / json) - MVC - Accept JSON when content-type is custom (not application/json) 使用Content-Type:application / json时,对Activiti REST API的POST请求导致CORS问题 - POST request to Activiti REST API causes CORS issue when using Content-Type:application/json RESTEasy:找不到内容类型应用程序/json 类型的编写器 - RESTEasy: Could not find writer for content-type application/json type 如何在不指定内容类型的情况下将 JSON POST/PUT 到 REST API 端点:application/json header - How do I POST/PUT JSON to a REST API endpoint without specifying Content-Type: application/json header 使用 Fetch API javascript 将 Content-Type 设置为 application/Json - set Content-Type to application/Json using Fetch API javascript spring rest webservices使用application / json content-type返回multipart / form-data - spring rest webservices return multipart/form-data with application/json content-type
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM