1.0.1 • Published 4 years ago

@techcityventures/network-requests v1.0.1

Weekly downloads
148
License
ISC
Repository
gitlab
Last release
4 years ago

Network Requests

The default package to perform requests between TCV frontend and backend.

Install

npm install --save @techcityventures/network-requests

Usage

// general import
const requests = require("@techcityventures/notifications-backend")

// specific import
const { GET, POST, PUT, PATCH, DELETE } = require("@techcityventures/notifications-backend")


// usage
const url = projectSpecificUrl

//  get will pass the params into the query
GET({ url, data:{ userId:"XXX", limit:10, param1: "YYY" } })

// post, put, patch, delete will transmit the parameters as json
POST({ url, data:{ userId:"XXX", limit:10, param1: "YYY" } })

PUT({ url, data:{ userId:"XXX", limit:10, param1: "YYY" } })

PATCH({ url, data:{ userId:"XXX", limit:10, param1: "YYY" } })

DELETE({ url, data:{ userId:"XXX", limit:10, param1: "YYY" } })
1.0.1

4 years ago

1.0.0

4 years ago