@aurelle/http-fetcher
Advanced tools
Comparing version 0.0.2 to 0.0.3
{ | ||
"name": "@aurelle/http-fetcher", | ||
"version": "0.0.2", | ||
"version": "0.0.3", | ||
"description": "A blazing fast, lightweight and easy to use HTTP client based on the fetch API.", | ||
@@ -5,0 +5,0 @@ "private": false, |
@@ -121,3 +121,3 @@ import { JSON_HEADERS } from "src/constants"; | ||
constructor(private readonly fetcherConfig: HttpFetcherConstructor) {} | ||
constructor(private readonly fetcherConfig: HttpFetcherConstructor = {}) {} | ||
@@ -152,3 +152,3 @@ extend<T, U>( | ||
async get<ResponseType>( | ||
async get<ResponseType = any>( | ||
url: string, | ||
@@ -168,5 +168,5 @@ { headers = {}, params = {} }: HttpFetcherConfig = {} | ||
async post<ResponseType, RequestType>( | ||
async post<ResponseType = any, BodyType = any>( | ||
url: string, | ||
body: RequestType, | ||
body: BodyType, | ||
{ headers = {}, params = {} }: HttpFetcherConfig = {} | ||
@@ -186,5 +186,5 @@ ): Promise<HttpFetcherResponse<ResponseType>> { | ||
async put<ResponseType, RequestType>( | ||
async put<ResponseType = any, BodyType = any>( | ||
url: string, | ||
body: RequestType, | ||
body: BodyType, | ||
{ headers = {}, params = {} }: HttpFetcherConfig = {} | ||
@@ -204,3 +204,3 @@ ): Promise<HttpFetcherResponse<ResponseType>> { | ||
async delete<ResponseType>( | ||
async delete<ResponseType = any>( | ||
url: string, | ||
@@ -207,0 +207,0 @@ { headers = {}, params = {} }: HttpFetcherConfig = {} |
47502