Skip to content
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

Creating clients duplicates url namespace #144

Closed
lindyhopchris opened this issue Feb 12, 2018 · 0 comments
Closed

Creating clients duplicates url namespace #144

lindyhopchris opened this issue Feb 12, 2018 · 0 comments
Milestone

Comments

@lindyhopchris
Copy link
Member

It seems strange to do the following:

$g = new GuzzleHttp\Client(['base_uri' => 'http://localhost/data/resources/']);
$client = json_api('default')->client($g);

when the config for the default API has the namespace as /data/resources. This would be better:

// $options is other guzzle options (optional)
$client = json_api('default')->client('http://localhost', $options);
@lindyhopchris lindyhopchris added this to the 1.0.0 milestone Feb 12, 2018
lindyhopchris added a commit that referenced this issue Aug 31, 2018
lindyhopchris added a commit that referenced this issue Sep 17, 2018
* Initial work on updating the Guzzle client

* Add more serialization logic

* Extract serialization logic into its own class

* Add integration test and create client from string host

Closes #144

* Fix constructor arguments

* Add tests for #144

* Fix interface method signature

* Restructure client integration tests

* Move all client tests to integration tests

* Move client out of HTTP namespace

* Throw a more useful client exception

* Set options rather than provided them for each method

* Add more refactoring

* Ensure null relations are serialized by client

* Add relationship methods to client

* Update docs and upgrade guide

* Add minor change to creating a client

* Improve client query parameters
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant