Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR TYPESCRIPT

typescript axios

interface User {
    id: number;
    firstName: string;
}


axios.get<User[]>('http://localhost:8080/admin/users')
        .then(response => {
            console.log(response.data);
            setUserList( response.data );
        });
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #typescript #axios
ADD COMMENT
Topic
Name
6+7 =