3

I have a .NET endpoint that received a wrapped request.

[ServiceContract(Name = "xxx")]
    public interface IX
    {
        [OperationContract]
        [WebInvoke(UriTemplate = "yyyy", 
            RequestFormat = WebMessageFormat.Json, 
            ResponseFormat = WebMessageFormat.Json,
            BodyStyle = WebMessageBodyStyle.WrappedRequest,
            Method = "POST")]

When the C# client hits this endpoint and I look at the post payload in Chrome dev tools/network, I see the JSON payload.

Just passing that JSON body to postman does not work since my endpoint is expecting a wrappedRequest.

How can I mimic the same using postman and hitting the same endpoint?

reza
  • 5,972
  • 15
  • 84
  • 126
  • Looking at this: https://stackoverflow.com/questions/20206069/restful-web-service-body-format, seems that the wrapped JSON request merely wraps the JSON in one extra level of braces like `{entity:{}}`. – see sharper Aug 08 '19 at 23:50
  • not what I am seeing. I see the payload as the JSON and not wrapped in any outer key. – reza Aug 09 '19 at 00:13

0 Answers0