Layer7 API Management

  • 1.  Error 415 Unsupported Media type

    Posted Dec 17, 2018 10:16 AM

    Hello, 

    I am using Postman to test my proxy.

    My request contains 

    "SenderDetails" : {

         "userId" : "ABC",

         "userType":"TEST"  

     }. 

    I used Evaluate JSON Path Expression to fetch userId and then route to some url with that userId.

    However, I get 415 Unsupported Media type as error in Postman.

     

    The header part contains Content-Type as Application/json



  • 2.  Re: Error 415 Unsupported Media type

    Broadcom Employee
    Posted Dec 17, 2018 10:35 AM

    Hi ,

     

    Did you  check the logs on the gateway and the service debugger to see what could be wrong with this

    request ?

     

    https://docops.ca.com/ca-api-gateway/9-4/en/published-services-and-policies/working-with-policies/debug-a-policy/working-with-the-service-debugger

     

    regards

    Dirk



  • 3.  Re: Error 415 Unsupported Media type

    Posted Dec 17, 2018 11:33 AM

    Hi Dirk, 

     

    I get the response content type as ''application/octet-stream", which I think should be "application/json".

    Any suggestion on how to convert the content type of response ?



  • 4.  Re: Error 415 Unsupported Media type
    Best Answer

    Posted Dec 17, 2018 11:52 AM

    Hi Dirk, 

     

    I have added Transport Properties/ Header Properties assertion to update Content-Type property to 'application/json', working fine now.