Can I pass custom data in the HTTP header?

前端 未结 7 1177
醉梦人生
醉梦人生 2021-02-12 17:14

I have a whole bunch of web services each with several web methods. The consumers of these services are varied and many. I want to augment each of these web methods with an extr

7条回答
  •  暗喜
    暗喜 (楼主)
    2021-02-12 18:14

    Its a bit unorthodox and I'm sure some purists would be upset at the idea (the headers should only be used for the transport of the message, and should not contain the semantics of the message).

    Practically its doable, but you want to be sure all your clients can add these headers. If your clients are using tools to call the web methods rather than generating the HTTP requests themselves (which I'd hope is the case) then there's a real chance this is a problem.

    Why is it so hard to add these additional overloads of the methods?

提交回复
热议问题