What is the best way to design a HTTP request when somewhat complex parameters are needed?

前端 未结 11 1008
一向
一向 2020-12-13 00:21

I have some web services that I am writing and I am trying to be as RESTful as possible. I am hosting these web services using a HTTPHandler running inside of IIS/ASP.NET/S

11条回答
  •  南方客
    南方客 (楼主)
    2020-12-13 00:50

    Consider supporting :
    - GET requests with short query string
    - POST requests with long query string into the body and X-HTTP-Method-Override: GET (https://en.wikipedia.org/wiki/List_of_HTTP_header_fields)

    Beware not mixing "POST /orders" that is a bulk creation of new orders and "POST /orders" with a "X-HTTP-Method-Override: GET" that is a search of order.

提交回复
热议问题