RESTful GET,如果存在大量参数,是否有必要变通一下

2025-05-10 02:20:43
推荐回答(1个)
回答1:

  变通不是必要的。如果是因为URI可能超长,导致了某个组件不支持,那么换一个组件就好了。

  根据 Fielding Dissertation: CHAPTER 6: Experience and Evaluation 6.3.2.5 Size Limits 里提到的:
  There is no limit in the HTTP protocol on the length of URI
  尽管
  Although older Web clients have a well-known problem with URI that consist of more than 255 characters
  解决方法是:
  applications within a controlled context (such as an intranet) can avoid those limits by replacing the older components