Skip to content

import #357

Answered by sholladay
andreatrygit asked this question in Q&A
Jun 7, 2021 · 1 comments · 7 replies
Discussion options

You must be logged in to vote
<script type="module">
    import ky from 'https://cdn.jsdelivr.net/npm/[email protected]/distribution/index.min.js';
    
    const json = await ky('https://jsonplaceholder.typicode.com/todos/1').json();

    console.log(json.title);
    //=> 'delectus aut autem
</script>

Replies: 1 comment 7 replies

Comment options

You must be logged in to vote
7 replies
@andreatrygit
Comment options

@sholladay
Comment options

@andreatrygit
Comment options

@sholladay
Comment options

@andreatrygit
Comment options

Answer selected by andreatrygit
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants