Replaced curl implementation with Http Client
Fixes
Fixes for #350 (closed).
Description
Replaced current curl implementation with CakePhp Http Client.
Technicalities
For performing request body search using HTTP we need to use POST request(works same as GET request for ES searching) as passing request body in GET request is not suggested by HTTP protocol.
Ref:
- https://stackoverflow.com/questions/36939748/elasticsearch-get-request-with-request-body
- https://stackoverflow.com/questions/978061/http-get-with-request-body
Tests
- Enable ES container.
- Perform a search on http://localhost:2354/.
- Verify the results.
Checklist:
-
My pull request has a descriptive title (not a vague title like "Update index.md"). -
My pull request targets the phoenix/developbranch of the repository. -
My commit messages follow best practices. -
My code follows the established code style of the repository. -
I tried running the project locally and verified that there are no visible errors.