on-internet
← Community

HTTP 415 unsupported media type error when calling Web API 2 endpoint

Stack Overflow ·

I have an existing Web API 2 service and need to modify one of the methods to take a custom object as another parameter, currently the method has one parameter which is a simple string coming from the URL. After adding the custom object as a parameter I am now getting a 415 unsupported media type error when calling the service from a .NET windows app. Interestingly, I can successfully call this method using javascript and the jquery ajax method. The Web API 2 service method looks like this: <HttpPost> <HttpGet> <Route("{view}")> Public Function GetResultsWithView(view As String, pPaging As Pag

Comments

Sign in or sign up to comment and upvote.

No comments yet.