Skip to content

Allow custom HTTP client and add Guzzle adapter #348

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

npabisz
Copy link
Contributor

@npabisz npabisz commented Jul 17, 2025

This PR add more flexibility to the library allowing to use custom HTTP clients, like Guzzle. There is also simple GuzzleAdapter added so developers don't need to write their own and start using package right away. By dafault it still uses cURL , however its wrapped in CurlAdapter. Both are implementing HttpClient interface.

$client = new GuzzleHttp\Client();
$config = array(
    // ...  
    'HttpClient' => new PHPShopify\GuzzleAdapter($client)
);

PHPShopify\ShopifySDK::config($config);

@npabisz
Copy link
Contributor Author

npabisz commented Jul 17, 2025

@tareqtms please have a look :)

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