The 1.[frombody] property can only be used on one parameter when there are multiple parameters in the body to define the type. A parameter key= "", value= "123", key is empty to fetch the value.
2. When a string type is returned, there will be double quotation marks around the content. To use the Httpresponsemessage type.
1 [HttpPost]2 Publichttpresponsemessage upmessage ([frombody]uploadsmsdto body)3 {4 5 stringMessage ="Dear dealer, you have submitted the redemption code has been successfully written off. Thank you for your support. "GAC Fick"";6 7 varResponse =Request.createresponse (Httpstatuscode.ok);8Response. StatusCode =Httpstatuscode.ok;9Response. Content =NewStringcontent (message);//Response ContentTen returnresponse; One}
Reference:
"Httpresponsemessage" http://www.it165.net/pro/html/201305/6019.html
"Frombody" http://www.cnblogs.com/babycool/p/3922738.html
C # WEBAPI Request mode post, return response