Skip to main content
Anoop Bhaskaran (GE) ha preguntado en #Apex
Is any faced the issue Error 415--Unsupported Media Type when invoking a REST call

Anoop
1 respuesta
  1. 29 nov 2017, 10:32
    Hi Anoop,

    Cause of the above issue:

    An incorrect "Content-Type" (eg.text/XML) or no "Content-Type" has been defined for the call.

    Resolution of the above issue:

    The correct "Content-Type" should be indicated in the call:

    curl -u admin:admin -X POST -d@cr.xml http://localhost:8060/rest-service/reviews-v1 -H "Content-Type: application/xml"

    Hope this will help you.

    Kindly mark this as solved if it's resolved so that it gets removed from the unanswered queue which results in helping others who are encountering a similar issue.

    Thanks,

    Nagendra

     
0/9000