mattbaird/elastigo — pull request #53 by CheRuisiBesares (2013-12-27 01:00:52+00:00)
Title: Exists shouldn't return error.

Exists shouldn't return error when the document isn't found. Currently it does because Do and then DoResponse is trying to Unmarshal the body of this request. Because the request verb is HEAD there is no payload and the following error occurs "unexpected end of JSON input". Passing nil here will prevent the conditions here (https://github.com/mattbaird/elastigo/blob/master/api/request.go#L104) from being met and therefore prevent this error. This doesn't seem to interfere with anything. Let me know if I have overlooked anything.