I got the below REST service, I need to test it from fiddler, and I've searched alot, I figured how the payload is structured like the below:
<Update xmlns="http://tempuri.org/">
<value></value>
</Update>
"value" can be XElement
or IEnumerable<XElement>
and nothing else.
the above XML is okay (means it hits a break point with empty pure object instance passed) but if I put "anything" inside node, I get 400 Bad Request without hitting any of my break points.
public interface ISomeInterface
{
[WebInvoke(Method = "PUT", UriTemplate = "/{key}", BodyStyle = WebMessageBodyStyle.WrappedRequest)]
void Update(string key, object value);
[WebInvoke(Method = "DELETE", UriTemplate = "/{key}")]
void Delete(string key);
}
public void Update(string key, object value)
{
this.UpdateSomething(key, value, true);
}
The question is how to create a proper xml to pass it to the service with Fiddler?