【发布时间】:2017-12-24 07:14:11
【问题描述】:
http://localhost:51238/RestService.svc/FOSLoadingS1Opening?Data=[
{
"Name":"Sachin",
"City":"Bengalueu",
"FimStatus":"false",
"Deno1":"50",
"Deno2":"100",
"Deno3":"500",
"Deno4":"2000",
"IndtVal1":"2500",
"IndtVal2":"5000" }]
我可以通过查询字符串传递 json 字符串。但是,当我想通过没有查询字符串的传递时,我得到了错误。
http://localhost:51238/RestService.svc/FOSLoadingS1Opening/[
{
"Name":"Sachin",
"City":"Bengalueu",
"FimStatus":"false",
"Deno1":"50",
"Deno2":"100",
"Deno3":"500",
"Deno4":"2000",
"IndtVal1":"2500",
"IndtVal2":"5000" }]
当我通过上面的 URL 时,我收到错误“错误请求”。
我想在不使用查询字符串的情况下传递 json 字符串。请建议如何实现。
【问题讨论】:
-
唯一的方法是使用webinvoke(post)而不是webget