Created
July 13, 2015 19:33
-
-
Save palcu/efb77a4507569d67665f to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
"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