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

@alwatr/fetch

Package Overview
Dependencies
Maintainers
0
Versions
79
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@alwatr/fetch - npm Package Compare versions

Comparing version 4.1.7 to 4.2.0

10

CHANGELOG.md

@@ -6,2 +6,12 @@ # Change Log

## [4.2.0](https://github.com/Alwatr/nanolib/compare/@alwatr/fetch@4.1.7...@alwatr/fetch@4.2.0) (2024-10-28)
### Features
* **fetch:** use @alwatr/http-primer for types and http codes ([6fe993a](https://github.com/Alwatr/nanolib/commit/6fe993ac0f395a4c0c6ad3b2caa48a2986cc850f)) by @AliMD
### Code Refactoring
* **fetch:** update HTTP headers content-type to use MimeTypes constant ([c3862fc](https://github.com/Alwatr/nanolib/commit/c3862fc6a643da97dacbd15bcf5d3351caaaf269)) by @AliMD
## [4.1.7](https://github.com/Alwatr/nanolib/compare/@alwatr/fetch@4.1.6...@alwatr/fetch@4.1.7) (2024-10-25)

@@ -8,0 +18,0 @@

11

dist/type.d.ts

@@ -0,7 +1,4 @@

import type { HttpMethod, HttpRequestHeaders, HttpStatusCode } from '@alwatr/http-primer';
import type { Duration } from '@alwatr/parse-duration';
/**
* Represents the available HTTP methods.
*/
export type HttpMethod = 'GET' | 'POST' | 'PUT' | 'DELETE' | 'PATCH' | 'OPTIONS' | 'HEAD' | 'CONNECT' | 'TRACE';
/**
* Represents a dictionary of query parameters.

@@ -47,3 +44,3 @@ * The keys are strings and the values can be strings, numbers, or booleans.

*/
headers?: DictionaryReq<string>;
headers?: Record<string, string> & HttpRequestHeaders;
/**

@@ -124,7 +121,7 @@ * A timeout for the fetch request.

ok: true;
statusCode: number;
statusCode: HttpStatusCode;
};
export type ResponseError = {
ok: false;
statusCode: number;
statusCode: HttpStatusCode;
errorCode: string;

@@ -131,0 +128,0 @@ errorMessage: string;

{
"name": "@alwatr/fetch",
"version": "4.1.7",
"version": "4.2.0",
"description": "Enhanced fetch API with cache strategy, retry pattern, timeout, helper methods and enhanced types.",

@@ -77,2 +77,3 @@ "author": "S. Ali Mihandoost <ali.mihandoost@gmail.com>",

"@alwatr/global-this": "^1.0.2",
"@alwatr/http-primer": "^1.0.0",
"@alwatr/logger": "^4.0.7",

@@ -90,3 +91,3 @@ "@alwatr/package-tracer": "^1.0.7",

},
"gitHead": "a1e430a02f9a5711fc43f19012091bcd8806c4f9"
"gitHead": "9b57df2f58636ddb4c064959950e707cf2422ecf"
}

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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