Skip to content

Instantly share code, notes, and snippets.

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 clement-joye/cd8a4357b9dca35779c49b739d7c5d11 to your computer and use it in GitHub Desktop.
Save clement-joye/cd8a4357b9dca35779c49b739d7c5d11 to your computer and use it in GitHub Desktop.
function prepareRequest(resource: DashboardCardResource, variables: { [key: string] : string }, pat: string) {
let url = SubtituteString(resource.absoluteUrl, variables);
const httpOptions = new HttpHeaders({
'Authorization': `Basic ${btoa(`"":${pat}`)}`,
'Accept': 'application/json'
});
return { url, httpOptions };
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment