2017-04-16 9 views
1

私がコールサービス http://xxxx:8102/GetDataOragn.svc/Test だけどしかし、エラー400

[WebInvoke(UriTemplate = "Test", Method = "POST", RequestFormat = 
WebMessageFormat.Json, ResponseFormat = WebMessageFormat.Json)] 
[OperationContract] 
Result Test(string s); 

[OperationBehavior] 
    public Result Test(string s) 
    { 
     return new Result() { Code = 0, Description = s, State =true }; 
    } 

400不正な要求を取得し、入力: 私は郵便配達を使用していますし、

Content-Type:application/json 
Body:raw 
{ 
"s":"THIS IS A TEXT MESSAGE" 
} 

ヘルプ

答えて

0

入力形式が間違っています。

"THIS IS A TEXT MESSAGE" 
:私は、それはこのようなものだと信じて、あなたのケースで

"String content" 

:ちょうどこれを投稿