Skip to content

Instantly share code, notes, and snippets.

@palcu
Created July 13, 2015 19:33
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save palcu/efb77a4507569d67665f to your computer and use it in GitHub Desktop.
Save palcu/efb77a4507569d67665f to your computer and use it in GitHub Desktop.
"use strict";
import $ from "jquery";
export default function(options, accessToken=null) {
let headers = {};
if (accessToken) {
headers = {
Authorization: accessToken
};
}
options = _.merge(options, {
method:'GET',
headers: headers
});
$.ajax(options);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment