Is there a canonical/RESTful way to send query details to a server during a GET?

后端 未结 8 1063
余生分开走
余生分开走 2021-01-18 19:23

I\'m designing a (more or less) RESTful internal web service running on ASP.NET and IIS. I want clients to be able to pass query details to the server when accessing large

8条回答
  •  遥遥无期
    2021-01-18 19:33

    I would use Option 4. It is difficult to put the query representation in json for a large search request into an url, especially against a search server. I agree, in that case it does not fit into a Restful style since the resources cannot be identified by the URI. REST is a guideline. If the scenario cannot be realized by REST then i guess do something that solves the problem. Here using POST is not restful but it seems to be the correct solution.

提交回复
热议问题