@hey-api/client-fetch
Advanced tools
Comparing version 0.2.4 to 0.3.0
@@ -22,2 +22,4 @@ type ArrayStyle = 'form' | 'spaceDelimited' | 'pipeDelimited'; | ||
constructor(); | ||
clear(): void; | ||
exists(fn: Interceptor): boolean; | ||
eject(fn: Interceptor): void; | ||
@@ -24,0 +26,0 @@ use(fn: Interceptor): void; |
{ | ||
"name": "@hey-api/client-fetch", | ||
"version": "0.2.4", | ||
"version": "0.3.0", | ||
"type": "module", | ||
"description": "Typesafe Fetch API client for your @hey-api/openapi-ts types", | ||
"description": "Type-safe Fetch API client for your @hey-api/openapi-ts types", | ||
"homepage": "https://heyapi.vercel.app/", | ||
@@ -47,2 +47,3 @@ "repository": { | ||
"dist", | ||
"LICENSE.md", | ||
"src" | ||
@@ -49,0 +50,0 @@ ], |
<div align="center"> | ||
<img width="150" height="150" src="https://heyapi.vercel.app/logo.png" alt="Logo"> | ||
<h1 align="center"><b>Fetch API Client</b></h1> | ||
<p align="center">๐ Typesafe Fetch API client for your Hey API types.</p> | ||
<p align="center">๐ Type-safe Fetch API client for your Hey API types.</p> | ||
</div> | ||
@@ -14,3 +14,3 @@ | ||
- seamless integration with `@hey-api/openapi-ts` | ||
- typesafe response data and errors | ||
- type-safe response data and errors | ||
- access to the original request and response | ||
@@ -17,0 +17,0 @@ - granular request and response customization options |
@@ -29,5 +29,5 @@ import type { Client, Config, RequestOptions } from './types'; | ||
// @ts-ignore | ||
// @ts-expect-error | ||
const request: Client['request'] = async (options) => { | ||
// @ts-ignore | ||
// @ts-expect-error | ||
const opts: RequestOptions = { | ||
@@ -146,3 +146,3 @@ ..._config, | ||
trace: (options) => request({ ...options, method: 'TRACE' }), | ||
} as Client; | ||
}; | ||
}; |
@@ -443,2 +443,10 @@ import type { Config } from './types'; | ||
clear() { | ||
this._fns = []; | ||
} | ||
exists(fn: Interceptor) { | ||
return this._fns.indexOf(fn) !== -1; | ||
} | ||
eject(fn: Interceptor) { | ||
@@ -445,0 +453,0 @@ const index = this._fns.indexOf(fn); |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Unidentified License
License(Experimental) Something that seems like a license was found, but its contents could not be matched with a known license.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
49449
1057
1
80