UNPKG

@push.rocks/smartrequest

Version:

A module for modern HTTP/HTTPS requests with support for form data, file uploads, JSON, binary data, streams, and more.

17 lines (16 loc) 720 B
import * as interfaces from './smartrequest.interfaces.js'; /** * the interfae for FormFieldData */ export interface IFormField { name: string; type: 'string' | 'filePath' | 'Buffer'; payload: string | Buffer; fileName?: string; contentType?: string; } export declare const postFormData: (urlArg: string, optionsArg: interfaces.ISmartRequestOptions, payloadArg: IFormField[]) => Promise<import("./smartrequest.request.js").IExtendedIncomingMessage<any>>; export declare const postFormDataUrlEncoded: (urlArg: string, optionsArg: interfaces.ISmartRequestOptions, payloadArg: { key: string; content: string; }[]) => Promise<import("./smartrequest.request.js").IExtendedIncomingMessage<any>>;