drewm / mailchimp-api

Super-simple, minimum abstraction MailChimp API v3 wrapper, in PHP
MIT License
1.99k stars 506 forks source link

Custom user agent in curl header #277

Closed plivius closed 5 years ago

plivius commented 5 years ago

Hi @drewm, thank you for work on this project!

I'd like to propose to allow customising the User-Agent string which is passed to the MailChimp API.

When conducting e2e tests in a multi-project environment, it is convenient to differentiate the "last api call results" based on the User Agent (https://....admin.mailchimp.com/account/api/).

E.g: https://github.com/drewm/mailchimp-api/compare/master...plivius:feature/custom-user-agent-string?expand=1

drewm commented 5 years ago

I think the medium-term solution to this is going to be to allow the passing in of a configured HTTP client. That'll be in the next major version.