Add a custom response header in ApiController

后端 未结 6 1703
难免孤独
难免孤独 2021-02-05 02:41

Until now, I had a GET method that looked like the following:

protected override async Task GetAll(QueryData query)
{
              


        
6条回答
  •  夕颜
    夕颜 (楼主)
    2021-02-05 02:59

    Simple solution is to write just this:

    HttpContext.Current.Response.Headers.Add("MaxRecords", "1000");
    

提交回复
热议问题