Skip to content

Instantly share code, notes, and snippets.

@jimzer
Created October 25, 2020 14:07
Show Gist options
  • Select an option

  • Save jimzer/99818947f08b1a501babb3e726486c88 to your computer and use it in GitHub Desktop.

Select an option

Save jimzer/99818947f08b1a501babb3e726486c88 to your computer and use it in GitHub Desktop.
Gist Test
import axios from "axios";
const githubClient = axios.create({
baseURL: "https://api.github.com/",
timeout: 1000,
//headers: { "X-Custom-Header": "foobar" },
});
export default class Gist {
constructor() {}
static async getAllGists(): void {
try {
const gists = await githubClient.get("/users/jimzer/gists");
console.log("================", gists.data);
} catch (err) {
console.error(err);
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment