REST APIs: custom HTTP headers vs URL parameters

后端 未结 8 1254
太阳男子
太阳男子 2020-12-12 11:41

When do you use custom HTTP headers in the request part of a REST API ?

Example:

Would you ever use

GET /orders/view 
(custom HTTP header)          


        
8条回答
  •  半阙折子戏
    2020-12-12 12:25

    I wouldn't use custom headers as you don't know if any proxies will pass those on. URL based is the way to go.

    GET /orders/view/client/23

提交回复
热议问题