The base class for service classes related to database entities. It allows to use pseudo inheritance between the service class and related repository class;
Associate service class with the repository class which will using in pseudo inheritance.
- $repository - valid class name of repository class.
Service to working with http/https protocols based on Guzzle library.
Features:
- service can be injected via the
app()
helper, which allows to mock it in testing; - debug mode, write all requests into the log file. Enabling by setting config
defaults.http_service_debug
totrue
.
Method to send GET
request to $url
.
Make request, save response to the protected field and return self.
Method to send POST
request to $url
.
Method to send DELETE
request to $url
.
Method to send PUT
request to $url
.
Method to send PATCH
request to $url
.
Return last response object.
Return last response's content as associative array.
Saving cookies from request.
Return saved cookies.