Skip to content

Samantao93/fetchAPI

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 

Repository files navigation

API Fetch Utility (Node.js)

Minimal Node.js script to:

  • Get an auth token (/api/token)
  • Call protected endpoints
  • Save responses as JSON

Environment variables:

API_URL=https://fakeapi.com
API_BEARER=initial_token

Usage:

# Call impDataPar → saves as query1.json
node index.js query1

# With parameter Id
node index.js query1 Id=1234 out=test.json

# Call impData with parameters
node index.js query2 Idquery=111111 date=1900-01-01

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published