elasticsearch/elasticsearch-js — pull request #45 by jeff-french (2014-02-13 03:15:59+00:00)
Title: Add support for Basic Authentication in Angular client.

In order to use Basic Authentication with Angular's `$http` provider you must add the `Authorization` header yourself.

This PR Base64 encodes the `username:password` from the `host.auth` property, adds it to the `Authorization` header and sets `withCredentials: true`.