@toruslabs/http-helpers
Advanced tools
Comparing version 2.0.0 to 2.1.0
@@ -0,1 +1,7 @@ | ||
export interface CustomOptions { | ||
[key: string]: unknown; | ||
useAPIKey?: boolean; | ||
isUrlEncodedData?: boolean; | ||
timeout?: number; | ||
} | ||
export declare const gatewayAuthHeader = "x-api-key"; | ||
@@ -10,6 +16,6 @@ export declare const gatewayEmbedHostHeader = "x-embed-host"; | ||
export declare const promiseTimeout: <T>(ms: number, promise: Promise<T>) => Promise<T>; | ||
export declare const get: (url: string, options_?: Record<string, unknown>, customOptions?: Record<string, unknown>) => Promise<any>; | ||
export declare const post: (url: string, data?: Record<string, unknown>, options_?: Record<string, unknown>, customOptions?: Record<string, unknown>) => Promise<any>; | ||
export declare const patch: (url: string, data?: Record<string, unknown>, options_?: Record<string, unknown>, customOptions?: Record<string, unknown>) => Promise<any>; | ||
export declare const remove: (url: string, _data?: Record<string, unknown>, options_?: Record<string, unknown>, customOptions?: Record<string, unknown>) => Promise<any>; | ||
export declare const get: <T>(url: string, options_?: RequestInit, customOptions?: CustomOptions) => Promise<T>; | ||
export declare const post: <T>(url: string, data?: Record<string, unknown>, options_?: RequestInit, customOptions?: CustomOptions) => Promise<T>; | ||
export declare const patch: <T>(url: string, data?: Record<string, unknown>, options_?: RequestInit, customOptions?: CustomOptions) => Promise<T>; | ||
export declare const remove: <T>(url: string, _data?: Record<string, unknown>, options_?: RequestInit, customOptions?: CustomOptions) => Promise<T>; | ||
export declare const generateJsonRPCObject: (method: string, parameters: unknown) => { | ||
@@ -21,2 +27,2 @@ jsonrpc: string; | ||
}; | ||
export declare const promiseRace: (url: string, options: Record<string, unknown>, timeout?: number) => Promise<any>; | ||
export declare const promiseRace: <T>(url: string, options: RequestInit, timeout?: number) => Promise<Awaited<T>>; |
{ | ||
"name": "@toruslabs/http-helpers", | ||
"version": "2.0.0", | ||
"version": "2.1.0", | ||
"description": "http helpers", | ||
@@ -5,0 +5,0 @@ "main": "dist/httpHelpers.cjs.js", |
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
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
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
686924
5153