2011-04-01 75 views
1

我將Json數據發佈到Restful Api。何處發佈Data in HttpContext

服務器ASP.Net MVC應用程序中的數據自動綁定到使用JsonValueProviderFactory

[HttpPut] 
[ActionName("Student")] 
public ActionResult PutStudent(Student s) 
{ 
    return Content(""); 
} 

只有某些JSON數據被綁定到一個學生模型對象。其他人不是。在MVC應用程序中,我如何看到原始發佈的數據?我無法在HttpContext中找到它。

請幫忙。

回答

3

嘗試讀取HttpContext.Request.InputStream對象中的流。

0

您可以使用Fiddler來檢查原始HTTP流量。

+0

提琴手功能現在也基本內置到Chrome和Firebug中。 – 2011-04-01 12:16:02

+1

@NickLarsen,誰說客戶端是瀏覽器?當然,如果是這樣,FireBug就是要走的路。 – 2011-04-01 12:16:59