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

@exceptionless/fetchclient

Package Overview
Dependencies
Maintainers
2
Versions
24
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@exceptionless/fetchclient - npm Package Compare versions

Comparing version 0.11.5 to 0.11.7

7

esm/src/FetchClient.js

@@ -24,6 +24,3 @@ import { Counter } from "./Counter.js";

this.#cache = options?.cache ?? new FetchClientCache();
this.#fetch = options?.fetch ?? globalThis.fetch;
if (!this.#fetch) {
throw new Error("No fetch implementation available");
}
this.#fetch = options?.fetch;
this.#providerCounter = options?.providerCounter ?? new Counter();

@@ -265,3 +262,3 @@ this.use(...(options?.middleware ?? []));

}
const response = await this.#fetch(ctx.request);
const response = await (this.#fetch ? this.#fetch(ctx.request) : fetch(ctx.request));
if (ctx.request.headers.get("Content-Type")?.startsWith("application/json") ||

@@ -268,0 +265,0 @@ ctx.request.headers.get("Accept")?.startsWith("application/json") ||

@@ -18,3 +18,3 @@ import { FetchClient } from "./FetchClient.js";

this.#cache = new FetchClientCache();
this.#fetch = fetch ?? globalThis.fetch;
this.#fetch = fetch;
}

@@ -72,3 +72,3 @@ /**

cache: this.#cache,
fetch: this.#fetch,
fetch: this.fetch,
middleware: this.#options.middleware,

@@ -75,0 +75,0 @@ modelValidator: this.#options.modelValidator,

{
"name": "@exceptionless/fetchclient",
"version": "0.11.5",
"version": "0.11.7",
"description": "A simple fetch client with middleware support for Deno and the browser.",

@@ -5,0 +5,0 @@ "keywords": [

@@ -27,6 +27,3 @@ "use strict";

this.#cache = options?.cache ?? new FetchClientCache_js_1.FetchClientCache();
this.#fetch = options?.fetch ?? globalThis.fetch;
if (!this.#fetch) {
throw new Error("No fetch implementation available");
}
this.#fetch = options?.fetch;
this.#providerCounter = options?.providerCounter ?? new Counter_js_1.Counter();

@@ -268,3 +265,3 @@ this.use(...(options?.middleware ?? []));

}
const response = await this.#fetch(ctx.request);
const response = await (this.#fetch ? this.#fetch(ctx.request) : fetch(ctx.request));
if (ctx.request.headers.get("Content-Type")?.startsWith("application/json") ||

@@ -271,0 +268,0 @@ ctx.request.headers.get("Accept")?.startsWith("application/json") ||

@@ -21,3 +21,3 @@ "use strict";

this.#cache = new FetchClientCache_js_1.FetchClientCache();
this.#fetch = fetch ?? globalThis.fetch;
this.#fetch = fetch;
}

@@ -75,3 +75,3 @@ /**

cache: this.#cache,
fetch: this.#fetch,
fetch: this.fetch,
middleware: this.#options.middleware,

@@ -78,0 +78,0 @@ modelValidator: this.#options.modelValidator,

@@ -19,3 +19,3 @@ import { FetchClient, type FetchClientOptions } from "./FetchClient.js";

*/
get fetch(): Fetch;
get fetch(): Fetch | undefined;
/**

@@ -22,0 +22,0 @@ * Sets the fetch function used for making requests.

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