Accessing post or get parameters in custom authorization MVC4 Web Api

后端 未结 5 1019
轮回少年
轮回少年 2020-11-29 02:38

Is it possible to access post or get parameters via the HttpActionContext object?

I have a set of sensors that loggs data to a web server that provides a REST api.

5条回答
  •  眼角桃花
    2020-11-29 03:04

    You should be able to get this information from actionContext.Request That is the way to get to the request data.

    The posted data is in actionContext.Request.Content Or if it's a GET request you could get the querystring from actionContext.Request.RequestUri

提交回复
热议问题