I would like to use service-specific headers for each endpoint request. In other words, if I had servers A, B, and C and only one endpoint X (e.g. http://A/X, http://B/X, http://C/X) and all of these had different authorization headers, under the current model I could not provide the correct headers.
I thought of a few options:
if I could set endpoints.X.headers to a function and this function was called with the service name (e.g. A) I could map to the right headers
if services was an array of objects that were merged with the route object (e.g. Object.assign) I could set up my headers per-service
Do either of these make sense to do or is there something I'm missing in reading the documentation?
I would like to use service-specific headers for each endpoint request. In other words, if I had servers A, B, and C and only one endpoint X (e.g.
http://A/X
,http://B/X
,http://C/X
) and all of these had different authorization headers, under the current model I could not provide the correct headers.I thought of a few options:
endpoints.X.headers
to a function and this function was called with the service name (e.g.A
) I could map to the right headersObject.assign
) I could set up my headers per-serviceDo either of these make sense to do or is there something I'm missing in reading the documentation?