koonjs 0.4.4 → 0.4.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/index.d.ts +14 -9
- package/koon.darwin-arm64.node +0 -0
- package/koon.darwin-x64.node +0 -0
- package/koon.linux-arm64-gnu.node +0 -0
- package/koon.linux-x64-gnu.node +0 -0
- package/koon.win32-x64-msvc.node +0 -0
- package/package.json +1 -1
package/index.d.ts
CHANGED
|
@@ -61,6 +61,11 @@ export interface KoonWsMessage {
|
|
|
61
61
|
data: Buffer;
|
|
62
62
|
}
|
|
63
63
|
|
|
64
|
+
export interface KoonRequestOptions {
|
|
65
|
+
/** Additional headers for this request. Override constructor-level headers. */
|
|
66
|
+
headers?: Record<string, string>;
|
|
67
|
+
}
|
|
68
|
+
|
|
64
69
|
export interface KoonMultipartField {
|
|
65
70
|
/** Field name. */
|
|
66
71
|
name: string;
|
|
@@ -77,15 +82,15 @@ export interface KoonMultipartField {
|
|
|
77
82
|
export class Koon {
|
|
78
83
|
constructor(options?: KoonOptions);
|
|
79
84
|
|
|
80
|
-
get(url: string): Promise<KoonResponse>;
|
|
81
|
-
post(url: string, body?: Buffer): Promise<KoonResponse>;
|
|
82
|
-
put(url: string, body?: Buffer): Promise<KoonResponse>;
|
|
83
|
-
delete(url: string): Promise<KoonResponse>;
|
|
84
|
-
patch(url: string, body?: Buffer): Promise<KoonResponse>;
|
|
85
|
-
head(url: string): Promise<KoonResponse>;
|
|
86
|
-
request(method: string, url: string, body?: Buffer): Promise<KoonResponse>;
|
|
87
|
-
postMultipart(url: string, fields: KoonMultipartField[]): Promise<KoonResponse>;
|
|
88
|
-
requestStreaming(method: string, url: string, body?: Buffer): Promise<KoonStreamingResponse>;
|
|
85
|
+
get(url: string, options?: KoonRequestOptions): Promise<KoonResponse>;
|
|
86
|
+
post(url: string, body?: Buffer, options?: KoonRequestOptions): Promise<KoonResponse>;
|
|
87
|
+
put(url: string, body?: Buffer, options?: KoonRequestOptions): Promise<KoonResponse>;
|
|
88
|
+
delete(url: string, options?: KoonRequestOptions): Promise<KoonResponse>;
|
|
89
|
+
patch(url: string, body?: Buffer, options?: KoonRequestOptions): Promise<KoonResponse>;
|
|
90
|
+
head(url: string, options?: KoonRequestOptions): Promise<KoonResponse>;
|
|
91
|
+
request(method: string, url: string, body?: Buffer, options?: KoonRequestOptions): Promise<KoonResponse>;
|
|
92
|
+
postMultipart(url: string, fields: KoonMultipartField[], options?: KoonRequestOptions): Promise<KoonResponse>;
|
|
93
|
+
requestStreaming(method: string, url: string, body?: Buffer, options?: KoonRequestOptions): Promise<KoonStreamingResponse>;
|
|
89
94
|
|
|
90
95
|
websocket(url: string, headers?: Record<string, string>): Promise<KoonWebSocket>;
|
|
91
96
|
|
package/koon.darwin-arm64.node
CHANGED
|
Binary file
|
package/koon.darwin-x64.node
CHANGED
|
Binary file
|
|
Binary file
|
package/koon.linux-x64-gnu.node
CHANGED
|
Binary file
|
package/koon.win32-x64-msvc.node
CHANGED
|
Binary file
|