@exceptionless/fetchclient
Advanced tools
Comparing version 0.38.0 to 0.39.0
@@ -469,6 +469,9 @@ import { Counter } from "./Counter.js"; | ||
const isAbsoluteUrl = builtUrl.startsWith("http"); | ||
const localhostOrigin = builtUrl.startsWith("/") | ||
? "http://localhost" | ||
: "http://localhost/"; | ||
const origin = isAbsoluteUrl | ||
? undefined | ||
: globalThis.location?.origin ?? "http://localhost"; | ||
const parsed = new URL(builtUrl, origin); | ||
: globalThis.location?.origin ?? localhostOrigin; | ||
const parsed = origin ? new URL(builtUrl, origin) : new URL(builtUrl); | ||
if (options?.params) { | ||
@@ -475,0 +478,0 @@ for (const [key, value] of Object.entries(options?.params)) { |
{ | ||
"name": "@exceptionless/fetchclient", | ||
"version": "0.38.0", | ||
"version": "0.39.0", | ||
"description": "A simple fetch client with middleware support for Deno and the browser.", | ||
@@ -5,0 +5,0 @@ "keywords": [ |
@@ -472,6 +472,9 @@ "use strict"; | ||
const isAbsoluteUrl = builtUrl.startsWith("http"); | ||
const localhostOrigin = builtUrl.startsWith("/") | ||
? "http://localhost" | ||
: "http://localhost/"; | ||
const origin = isAbsoluteUrl | ||
? undefined | ||
: globalThis.location?.origin ?? "http://localhost"; | ||
const parsed = new URL(builtUrl, origin); | ||
: globalThis.location?.origin ?? localhostOrigin; | ||
const parsed = origin ? new URL(builtUrl, origin) : new URL(builtUrl); | ||
if (options?.params) { | ||
@@ -478,0 +481,0 @@ for (const [key, value] of Object.entries(options?.params)) { |
Sorry, the diff of this file is not supported yet
134983
2839