Skip to content

Instantly share code, notes, and snippets.

@electricimp
Created June 27, 2013 18:41
Show Gist options
  • Save electricimp/5879174 to your computer and use it in GitHub Desktop.
Save electricimp/5879174 to your computer and use it in GitHub Desktop.
Code snippet demonstrating how to do basic auth with an electric imp
function getBasicAuthHeader(user, password) {
local headers = {
"Authorization" : "Basic " + http.base64encode(user + ":" + password)
};
return headers;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment