Forum Discussion

newUser500's avatar
newUser500
New Contributor
3 years ago

Getting Unsupported Media Type in Response for REST Service

I am getting HTTP/1.1 415 Unsupported Media Type  <html><head><title>Error</title></head><body>Unsupported Media Type</body></html> in response while running a Rest Service with only Endpoint, Resource & Parameters. 

The same service is returning a success when I passed on the same URL with same headers through Postman. 

The same is returning a success message if I pass the same URL through Endpoint Explorer. 

 

https://www.xxxxxx.com/xxxx/rest/TokenGenerationService/GetUserAuthenticationToken?userId=xyz&password=abc&webServiceAppId=510&isBeforeLogin=false

2 Replies

  • newUser500's avatar
    newUser500
    New Contributor

    I have tried with multiple Content-Type headers but none are working. 

     

    Have tried - application/json, application/xml, text/text, text/html

    Response - X-Content-Type-Options: nosniff
    Access-Control-Allow-Headers: X-Requested-With, Content-Type, Origin, Authorization, Accept, Accept-Encoding
    Access-Control-Allow-Methods: GET, POST
    Content-Type: text/html;charset=UTF-8