是否可以使用Fiddler的Request Builder制作JSON请求?

V-M*_*Man 62 asp.net json web-services

我一直收到请求格式无效.

这是发送的原始http:

POST http://x.x.x.x/ws/MyWebService.asmx/TestEvent HTTP/1.1
contentType: "application/json; charset=utf-8",
  dataType: "json",
  data: {"strData":"1"}
Host: x.x.x.x
Content-Length: 4
Run Code Online (Sandbox Code Playgroud)

任何帮助是极大的赞赏.

谢谢!

Alx*_*ndr 125

我认为应该更像这样:

POST /ws/MyWebService.asmx/TestEvent HTTP/1.1
Host: x.x.x.x
Content-Type: application/json; charset=utf-8
Content-Length: 15

{"strData":"1"}
Run Code Online (Sandbox Code Playgroud)

并且您在连接中指定要连接的服务器.