Built something you're proud of? Tell the story. A quick G2 review of App Engine or Build Agent helps other developers see what's possible on ServiceNow. Share your experience.

PUT Method Error

madhusudanshett
Kilo Contributor

Hi Everyone

I have created a PUT method using the REST API Explorer. But other team is not able to consume it with PUT, following error was shown with 415 code

{

  "error": {

      "message": "Invalid content-type. Supported request media types for this service are: [application/json, application/xml, text/xml]",

      "detail": null

  },

  "status": "failure"

}

Please assist me on this issue.

Thanks in advance

5 REPLIES 5

That's JSON in the request body, alright. Now it's a matter of verifying that they are sending the right header to say "Hey! Here comes some JSON content!"



That's what the error message is indicating. "Your content doesn't match the request body. Please indicate and send us XML or JSON."