415 Unsupported Media Type

imageimageI'm currently able to successfully call GET and POST API calls against the World-Check One Pilot APIusing postman.But when I do the same thing with Java code then it is not fetching response.https://rms-world-check-one-api-pilot.thomsonreuters.com/v1/groups/5nzbfq9ku00z1eph2hi9o2ixa -

This GET request is throwing 401 response code

and


https://rms-world-check-one-api-pilot.thomsonreuters.com/v1/cases/screeningRequest -

This POST request is throwing 415 response code unsupported media type.

I tried both of the below content type.But both giving 415 response code
.addHeader("Content-Type", "application/x-www-form-urlencoded")
.addHeader("Content-Type", "application/json;charset=UTF-8")

what could be the error?

Best Answer

  • Prabhjyot
    Prabhjyot LSEG
    Answer ✓

    @maneesha,

    Thank you for your query.

    Can you please let us know the reason of using the below content-type?image

    The only supported header to be passed for content-type is - application/json.

    Please provide us the updated request headers of the api call, if removing the above line does not help in resolving the error.

Answers