Output full request, just in case
This commit is contained in:
Родитель
2f4d089998
Коммит
fea1d8f206
|
@ -1,6 +1,7 @@
|
|||
namespace AngleSharpSubmitTest.Controllers
|
||||
{
|
||||
using AngleSharpSubmitTest.Models;
|
||||
using System.IO;
|
||||
using System.Web.Mvc;
|
||||
|
||||
public class EchoController : Controller
|
||||
|
@ -11,6 +12,7 @@
|
|||
{
|
||||
var form = Request.Form;
|
||||
var count = form.Count;
|
||||
var reader = new StreamReader(Request.InputStream);
|
||||
var fields = new FormEntryModel[count];
|
||||
|
||||
for (int i = 0; i < count; i++)
|
||||
|
@ -24,7 +26,8 @@
|
|||
|
||||
return View(new FormModel
|
||||
{
|
||||
Fields = fields
|
||||
Fields = fields,
|
||||
Content = reader.ReadToEnd()
|
||||
});
|
||||
}
|
||||
}
|
||||
|
|
|
@ -6,6 +6,8 @@
|
|||
public class FormModel
|
||||
{
|
||||
public IEnumerable<FormEntryModel> Fields { get; set; }
|
||||
|
||||
public String Content { get; set; }
|
||||
}
|
||||
|
||||
public class FormEntryModel
|
||||
|
|
|
@ -13,3 +13,7 @@
|
|||
</tr>
|
||||
}
|
||||
</table>
|
||||
|
||||
<div id="input">
|
||||
@Model.Content
|
||||
</div>
|
||||
|
|
Загрузка…
Ссылка в новой задаче