I’m trying to POST to a REST service using the default WebHttpBinding binding. The service only accepts “text/xml” as the content-type and the WebHttpBinding is sending “application/xml, charset-utf=8”. Is there a way to change the default content type without using the the HttpWebRequest?
I’m trying to POST to a REST service using the default WebHttpBinding binding. The
Share
You can use the
WebOperationContextinside an operation scope to change the outgoing content type of the requests, as shown below.