Created
October 25, 2020 14:07
-
-
Save jimzer/99818947f08b1a501babb3e726486c88 to your computer and use it in GitHub Desktop.
Gist Test
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
| 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