
Security News
Attackers Are Hunting High-Impact Node.js Maintainers in a Coordinated Social Engineering Campaign
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.
silver-request
Advanced tools
A Fetch Wrapper with cache support that works with Redux
import SilverRequest from "silver-request";
new SilverRequest(dispatch)
.setUrl('http://github.com')
.setEvent('Github Loaded')
.send();
using yarn
yarn add silver-request
npm
npm install silver-request
simply run
yarn test
| method | type | default | Description |
|---|---|---|---|
setLogger | function | null | set a function for loggin eg console.log |
setRunOnSuccess | function | null | set a function to run on successful request and to call this method is useful when you want plugin call desire event on successful request |
setOnSuccess | function or object | function | set a function to be called after receiving respond , this will override calling event |
setOnError | function | function | set a function to be called after error happen |
setMethod | string | GET | set request type method |
setIsCachable | boolean | false | is request is cachable or not |
setUrl | string | null | |
setEvent | string | null | the event name (Redux Event) that will be fired after successful request |
setData | object | null | the data that will be sent by POST request |
setNeedLoading | boolean | false | |
addAdditionalHeader | object | null | adding additional header to request |
setAdditionalHeader | object | null | set additional header to request |
setCacheTime | integer | 30601000 | |
setIsHardRefresh | boolean | false | if true , it will ignore existing cache , but will cache the reponse |
send | call this method to send the request |
this properties will be applied to all request , set them in initializing you application
| name | type | default | Description |
|---|---|---|---|
additionalHeader | object | object | adding token for example |
lang | string | en_US | |
cacheHandler | Object | LocalStorageCacheHandler | |
cacheTime | Integer | 30601000 | |
globalOnSuccess | function | null | |
globalOnError | function | null | |
languageFile | Object | Object |
FAQs
Wrapper For Fetch Request With Cache Ability
We found that silver-request demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.

Security News
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.