Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

error : use 'application/json' Content-Type and raw POST with json data

Tags:

java

json

plivo

The error message

error : use 'application/json' Content-Type and raw POST with json data

is being appeared from cyclos application inside plivo console which a third API that need to be integrated in cyclos through

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"
}
like image 570
Muhammad Muazzam Avatar asked Sep 12 '26 15:09

Muhammad Muazzam


1 Answers

Can you try sending header as 'Content-Type' instead of 'content-type'.

There are some implementations where field-names are case-sensitive (Like an age-old bug in PHP!).

like image 98
Mohamed Anees A Avatar answered Sep 14 '26 03:09

Mohamed Anees A