Getting hold of raw POST data when using [FromBody]

后端 未结 3 1079
情话喂你
情话喂你 2020-12-20 16:09

I have a controller running on ASP.NET Core 1.0 RC2 and I\'d like to dump the raw POST data out to telemetry as ApplicationInsights doesn\'t do this for you. My code looks l

3条回答
  •  旧巷少年郎
    2020-12-20 16:42

    The request stream has already been read, so what you can do here is EnableRewind on the Request

    See solution here for reading json from body. Same should apply to your issue.

提交回复
热议问题