transgate
Version:
Agent-based task flow framework
20 lines (19 loc) • 600 B
TypeScript
import { GateItem, OutGate } from './type';
/**
* HTTP client Gate for Output
*/
export declare class HttpClientGate<T extends GateItem> implements OutGate<T> {
private _client;
private _params;
/**
* @param {string} options.endpoint - endpoint URL
* @param {string} options.method - request method
* @param {object} options.headers - request headers
*/
constructor(options?: any);
/**
* @param {object} item - sending item
* @return {Promise} - a promise that resolves when the item has been sended
*/
send(item: T): Promise<void>;
}