roy1210 / typescript-fetch-json

Make a network request to fetch some JSON and print the result

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Fetch json

Description

Make a network request to fetch some JSON and print the result

JSON Data

Data is fetching from JSONPlaceholder

Requirement

  • npm
  • typescript
  • ts-node
    $ sudo npm install -g typescript ts-node

Usage

Clone repo, cd into folder then:

  • Run the code
    $ ts-node index.ts
  • Convert to plain JavaScript
    $ tsc index.ts

Tools

  • Axios: Promise based HTTP request

About

Make a network request to fetch some JSON and print the result

License:MIT License


Languages

Language:TypeScript 71.7%Language:JavaScript 28.3%