📜  axios 打字稿代码示例

📅  最后修改于: 2022-03-11 14:48:12.633000             🧑  作者: Mango

代码示例2
interface User {
    id: number;
    firstName: string;
}


axios.get('http://localhost:8080/admin/users')
        .then(response => {
            console.log(response.data);
            setUserList( response.data );
        });