Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@platform/http.types

Package Overview
Dependencies
Maintainers
1
Versions
44
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@platform/http.types - npm Package Compare versions

Comparing version 0.2.0 to 0.2.1

lib/types.fetch.d.ts

4

lib/types.d.ts
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",

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc