https://github.com/mazipan/how-to-call-api-in-nodejs
❓ How to make an API call in Node.js
https://github.com/mazipan/how-to-call-api-in-nodejs
fetch-api javascript nodejs tutorial
Last synced: 11 months ago
JSON representation
❓ How to make an API call in Node.js
- Host: GitHub
- URL: https://github.com/mazipan/how-to-call-api-in-nodejs
- Owner: mazipan
- License: mit
- Created: 2021-01-11T14:25:55.000Z (about 5 years ago)
- Default Branch: master
- Last Pushed: 2021-01-17T13:30:24.000Z (about 5 years ago)
- Last Synced: 2025-01-08T05:37:13.021Z (about 1 year ago)
- Topics: fetch-api, javascript, nodejs, tutorial
- Language: JavaScript
- Homepage: https://mazipan.space/cara-fetch-api-di-nodejs
- Size: 12.7 KB
- Stars: 4
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Funding: .github/FUNDING.yml
- License: LICENSE
Awesome Lists containing this project
README
# ❓ how-to-call-api-in-nodejs
## Article (in Bahasa Indonesia)
https://mazipan.space/cara-fetch-api-di-nodejs
## Installations
```shell
# Install pnpm
$ npm i -g pnpm
# Install dependencies
$ pnpm i
```
### 1. Native Node.js
Code on [src/01-native-https.js](https://github.com/mazipan/how-to-call-api-in-nodejs/blob/master/src/01-native-https.js)
Test API Call:
```shell
$ pnpm run call:1
```
### 2. Node Fetch
Code on [src/02-node-fetch.js](https://github.com/mazipan/how-to-call-api-in-nodejs/blob/master/src/02-node-fetch.js)
Test API Call:
```shell
$ pnpm run call:2
```
### 3. Axios
Code on [src/03-axios.js](https://github.com/mazipan/how-to-call-api-in-nodejs/blob/master/src/03-axios.js)
Test API Call:
```shell
$ pnpm run call:3
```
### 4. SuperAgent
Code on [src/04-superagent.js](https://github.com/mazipan/how-to-call-api-in-nodejs/blob/master/src/04-superagent.js)
Test API Call:
```shell
$ pnpm run call:4
```
### 5. Got
Code on [src/05-got.js](https://github.com/mazipan/how-to-call-api-in-nodejs/blob/master/src/05-got.js)
Test API Call:
```shell
$ pnpm run call:5
```
### 6. Exec-Sync
Code on [src/06-exec-sync.js](https://github.com/mazipan/how-to-call-api-in-nodejs/blob/master/src/06-exec-sync.js)
Test API Call:
```shell
$ pnpm run call:6
```
### 7. ShellJS
Code on [src/07-shell.js](https://github.com/mazipan/how-to-call-api-in-nodejs/blob/master/src/07-shell.js)
Test API Call:
```shell
$ pnpm run call:7
```