Support static headers for http interface clients #33309
Labels
in: web
Issues in web modules (web, webmvc, webflux, websocket)
type: enhancement
A general enhancement
Milestone
It would be nice if http interface clients had support for specifying static headers declaratively on a per method basis. Envisioning something similar to what Retrofit has here.
Unless I've missed something, I believe the only two ways to supply headers currently are:
@RequestHeader
method parameter. Problem being the value must be provided every timeWebClient
/RestClient
/RestTemplate
backing the declarative client. Problem being you may not want to have those headers applied to every call, but rather just those on a particular methodHttpExchange already has support for
accept
andcontentType
, so perhaps a generic array of headers could be accepted there as wellThe text was updated successfully, but these errors were encountered: