@platform/http.types
Advanced tools
Comparing version 0.2.0 to 0.2.1
export * from './types.client'; | ||
export * from './types.events'; | ||
export * from './types.req'; | ||
export * from './types.res'; | ||
export * from './types.fetch'; | ||
export * from './types.payload'; | ||
export declare type HttpMethod = 'HEAD' | 'GET' | 'PUT' | 'POST' | 'DELETE' | 'PATCH' | 'OPTIONS'; | ||
@@ -6,0 +6,0 @@ export declare type IHttpHeaders = { |
@@ -1,4 +0,10 @@ | ||
/// <reference types="node" /> | ||
import { t, IDuration } from './common'; | ||
export declare type HttpRespondInput = t.IHttpRespondPayload | (() => t.IHttpRespondPayload) | (() => Promise<t.IHttpRespondPayload>); | ||
export declare type IHttpModify = { | ||
header(key: string, value: string): void; | ||
headers: { | ||
merge(headers: t.IHttpHeaders): void; | ||
replace(headers: t.IHttpHeaders): void; | ||
}; | ||
}; | ||
export declare type HttpEvent = IHttpBeforeEvent | IHttpAfterEvent; | ||
@@ -16,6 +22,3 @@ export declare type IHttpBeforeEvent = { | ||
isModified: boolean; | ||
modify(args: { | ||
data?: any | Buffer; | ||
headers?: t.IHttpHeaders; | ||
}): void; | ||
modify: t.IHttpModify; | ||
respond(payload: HttpRespondInput): void; | ||
@@ -31,4 +34,6 @@ }; | ||
url: string; | ||
ok: boolean; | ||
status: number; | ||
response: t.IHttpResponse; | ||
elapsed: IDuration; | ||
}; |
{ | ||
"name": "@platform/http.types", | ||
"version": "0.2.0", | ||
"version": "0.2.1", | ||
"description": "Types for the @platform/http library.", | ||
@@ -5,0 +5,0 @@ "main": "lib/index", |
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
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
5841
138
0