Skip to content

Conversation

RickKukiela
Copy link

This PR implements a new constructor parameter $source_ip which when set results in CURLOPT_INTERFACE being set to the provided value, forcing curl to use the provided IP address for outbound connections.

I also noticed that Accept and Content-Type headers used a JSON:API specific application/vnd.api+json which conflicts with the API documentation and has future potential to cause issues connecting through MC's Akami WAF gateway system. This is a separate commit within the PR.

…defaults to null for backward compatibility) which allows an integrator to set an override interface IP address to in the CURL requests. Strict typing was left out to keep code style similar. When used in the curl connection method, the `CURLOPT_INTERFACE` is only implemented when a non-empty string value is present in the $source_ip class property.
…est to the standard `application/json` value. While this is not currently causing an issue, MailChimp's API is plain REST with JSON and not JSON:API. All examples in their documentation use `application/json`. This is just future proofing given their use of Akami WAF Gateways where this has the potential to cause issues in the future.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant