Error consuming WebApi in C #

0

I have exposed a WebAPI developed with C# but when consuming the URL https://myServer.mx/webApiRestSyncService/api/Clients I have the error

  

HTTP / 1.1 415 Unsupported Media Type

How can I fix it?

    
asked by 02.12.2016 в 18:10
source

1 answer

0

You have to add the Content-Type that the Api receives, regularly it is with JSON or XML

For JSON is application/json For XML is text/xml , application/xml

Update

A client that I use to test the consumption of services is Fiddler

    
answered by 02.12.2016 / 18:13
source