Web API Get Method with Complex Object as Parameter

后端 未结 3 2006
情话喂你
情话喂你 2021-01-13 07:59

How to send a Complex Object( Which may have huge data) to a Web API Get Method? I know I can user \'FromUri\' option, but since the data is too large I can\'t use that opti

3条回答
  •  栀梦
    栀梦 (楼主)
    2021-01-13 08:17

    How to send a Complex Object( Which may have huge data) to a Web API Get Method?

    You can't. GET methods do not have request body. You have to send everything in the query string which has limitations.

    You should use POST instead.

提交回复
热议问题