msgraph-sdk-design
msgraph-sdk-design copied to clipboard
new handler design : payment models
The service is slowly rolling our payment models for large volume or highly value added APIs. As part of this roll out, client apps need to send the payment model they are using to track consumption as a query parameter. Instead of requiring client apps to set it on a per request basis, we could include a middleware handler that'd set it for any request, based on the client app configuration. (something like client.WithPaymentModel(model) would configure the client). Considerations:
- The model might be set on a per request basis, this handler shouldn't override that.
- This handler should provide the ability to be disabled through a request option on a per request basis.
- This handler should be disabled by default.
- This handler should create an observability span see #9
- Some APIs might not support receiving the query parameter, maybe work with a list of path patterns for the handler to operate on?