Open dstaley opened 5 days ago
Yes, unfortunately you're correct and this seems to be an unresolved issue in how the CSharp SDK is generated.
I worked around this issue by creating my own client, add the headers and then inject that into the PlexAPI class:
var client = new HttpClient();
client.DefaultRequestHeaders.Accept.Add(new MediaTypeWithQualityHeaderValue("application/json"));
var plexApi = new PlexAPI( client: client);
I would say that 99% of all endpoints use json responses. If you need an implementation example you can look here: https://github.com/PlexRipper/PlexRipper/blob/dev/src/PlexApi/PlexApiWrapper.cs
Forgive me if I'm missing it, but I don't think this SDK is setting the
Accept: application/json
header like the other SDKs?JavaScript Go
C#