es-result--handle-response: Add a hook to be called when the response is json data.
es-result--handle-response: Rework the method to get the http response information from the url library; make it run es-response-functions on the response buffer.
es-result--handle-response: I changed the functionality in the previous commit to run the hook and strip the headers regardless of HTTP status. Restore only doing it for 2xx requests.
es-result--handle-response: Split out the es-response-functions into an es-response-success-functions and an es-response-failure-functions.
es-result--handle-response: After much discussion, only remove the headers if the request was successful. Call the hooks with the full response data so that they're passed the same information.
Merge branch 'pr/8'
Fix a missing 'cl-lib require and change cadadr -> cl-cadadr