Open marfarma opened 10 years ago
How do you think the client library should behave in this?
You can send headers when making an API call using the client. Wouldn't that solve this issue?
@marfarma Could you describe this case more? Do you want the api clients to have some default headers?
Yes, exactly that. In my case the API is to a service that implements a facade against another API. Attributes required to connect to that API must exist in each request against mine. Rather than pollute every request payload, I expect a header with those values.
My thoughts were that I should be able to define required connection constants, and associated header formatting, encoding, etc. The values would be assigned once per connection instance of the client library. The library then builds the required headers and inserts them on each request.
My API requires custom headers, for a use case similar to this scenario:
I was concerned that I didn't see support for them in the todo list.