Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

myfetchapi

Package Overview
Dependencies
Maintainers
0
Versions
15
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

myfetchapi - npm Package Compare versions

Comparing version 1.7.1 to 1.7.2

2

package.json
{
"name": "myfetchapi",
"version": "1.7.1",
"version": "1.7.2",
"description": "mFetch is a JavaScript library that provides a utility function for making HTTP requests with queuing and retry functionality.",

@@ -5,0 +5,0 @@ "type": "commonjs",

@@ -11,2 +11,4 @@ # myfetchapi

npm install myfetchapi
yarn add myfetchapi
bun add myfetchapi
```

@@ -26,3 +28,5 @@

{ method: "GET" },
{ maxRetry: 5 /* default is 3. To disable retries, set it to `null` or `0` */ }
{
maxRetry: 5 /* default is 3. To disable retries, set it to `null` or `0` */,
}
)

@@ -43,2 +47,13 @@ .then((response) => console.log(response))

- `options` (optional): myFetchOptions - Additional options.
- `useNodeFetch` (optional): boolean - Set to true to use Node.js [Options](https://www.npmjs.com/package/node-fetch#fetch-options), e.g., agents.
- `maxRetry` (optional): number | null - How many times a request will retry if it failed. Default is 3.
- `retryCb` (optional): function - Callback function that is called when the HTTP(S) request is retrying.
- Parameters:
- `err`: Error object.
- `count`: Retry count.
- `max`: Max retry count.
- `retryCondition` (optional): function - Function to override and set your own condition for retrying.
- Parameters:
- `res`: HTTP(S) Response object.
- Returns: boolean | Promise<boolean>
- Returns: Promise<Response>

@@ -45,0 +60,0 @@

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc