Skip to content

Instantly share code, notes, and snippets.

@lydonchandra
Created December 16, 2013 01:56
Show Gist options
  • Save lydonchandra/7981296 to your computer and use it in GitHub Desktop.
Save lydonchandra/7981296 to your computer and use it in GitHub Desktop.
send XML string as POST body into WCF endpoint
[OperationContract]
[WebInvoke(Method = "GET", BodyStyle = WebMessageBodyStyle.WrappedRequest, ResponseFormat = WebMessageFormat.Json,
UriTemplate = "/proxy/?url={url}")]
String proxy_GET(string url);
[OperationContract]
[WebInvoke(Method = "POST", BodyStyle = WebMessageBodyStyle.Bare,
RequestFormat = WebMessageFormat.Xml, ResponseFormat = WebMessageFormat.Xml,
UriTemplate = "/proxy/?url={url}")]
XElement proxy_POST(string url, XElement postData);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment