New issue 36 by rgra...@gmail.com: Add ContentType property to JsonRpcClient
http://code.google.com/p/jayrock/issues/detail?id=36
What new or enhanced feature are you proposing?
Add a ContentType property to the JsonRpcClient which it will use when
creating WebRequest instances.
What goal would this enhancement help you achieve?
The JsonRpcClient uses the default content type for POST. Some servers
expect the content type "application/json-rpc". This enhancement will
allow the JsonRpcClient to be used with a wider range of JsonRpc servers by
allowing for any content type to be used.
Attachments:
JsonRpcClient.cs 5.8 KB
Thanks for the patch but unfortauntely it has a bug where content is
encoded as JSON in the (now proposed) default case
of "application/x-www-form-urlencoded". I also don't think this patch is
necessary as you can inherit from JsonRpcClient and override GetWebRequest
and Invoke for extensions/customizations such as the one proposed here. See
attached and modified JsonRpcClientDemo sample.
Attachments:
Program.cs 2.8 KB