这是我的GetMethod,GetStakeholder()方法,应该存储了值或出现了(参数= {“ action”:“ ITEM_LIST”,“ bio_access_id”:“ 121314”}),但不存储/获取值sParam ..
public class huhu : ApiController
{
[HttpGet]
[ActionName("GetStakeholder")]
public string GetStakeholder()
{
StringWriter sw = new StringWriter();
using (JsonWriter writer = new JsonTextWriter(sw))
{
writer.Formatting = Formatting.None;
writer.WriteStartObject();
writer.WritePropertyName("bio_access_id");
writer.WriteValue(UserSession.bio_access_id);
writer.WritePropertyName("action");
writer.WriteValue("ITEM_LIST");
writer.WriteEndObject();
}
string sParam = "param=" + sw.ToString();// HttpUtility.UrlEncode(sw.ToString());
return sParam;
}
}
}