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

Request manager to handle HTTP layer #10

Merged
merged 2 commits into from
Nov 20, 2017

Conversation

OndraM
Copy link
Member

@OndraM OndraM commented Nov 14, 2017

RequestManager takes prepared instance of Lmc\Matej\Model\Request, executes it (adding HmacAuth etc. to the HttpClient) it and processes the Http response to internal domain model (Lmc\Matej\Model\Response).

Usage example:

$matejRequest = new \Lmc\Matej\Model\Request('/item-properties', 'PUT', [[...], [...]]);

$matejResponse = $requestManager->sendRequest($matejRequest);

// => instance of Lmc\Matej\Model\Response

This is again part of API client internal HTTP layer. The example above will not be used directly in application code - the Request instance will ve prepared using builder objects (which will be done soon).

@OndraM OndraM changed the base branch from feature/responses to master November 15, 2017 16:39

/**
* Encapsulates HTTP layer, ie. request/response handling.
* This class should typically not be used directly - its supposed to be called internally from `Matej` class.
Copy link

@kubasimon kubasimon Nov 15, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"This class should not be typically used directly." - better word order

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Adjusted, thanks

@OndraM OndraM merged commit 96d11b3 into lmc-eu:master Nov 20, 2017
@OndraM OndraM added this to the 0.9 milestone Nov 23, 2017
@OndraM OndraM deleted the feature/request-manager branch January 15, 2024 13:27
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.

None yet

4 participants