I am using flurl to submit HTTP request and this is very useful. Now I need to change the \"Content-Type\" header for some of the requests to \"appl
I'm not an OData expert and I don't know what API you're calling (SharePoint?), but based on most examples I've seen, what you typically want to do is ask the server to send verbose OData in the response, rather than declare that you're sending it in the request. In other words, you want to set the ;odata=verbose
bit on the Accept header, not Content-Type. application/json
should be good enough for Content-Type, and Flurl will set that for you automatically, so just try this change and see if it works:
.WithHeader("Accept", "application/json;odata=verbose");