UNPKG

sync-request-curl

Version:

Fast way to send synchronous web requests in NodeJS. API is a subset of sync-request. Leverages node-libcurl for high performance. Cannot be used in a browser.

12 lines (11 loc) 630 B
/// <reference types="node" /> import { IncomingHttpHeaders } from 'http'; import { CurlCode } from 'node-libcurl'; import { HttpVerb, Options } from './types'; export declare const handleQs: (url: string, qs: { [key: string]: any; }) => string; export declare const parseIncomingHeaders: (headers?: IncomingHttpHeaders) => string[]; export declare const parseReturnedHeaders: (headerLines: string[]) => IncomingHttpHeaders; export declare const checkValidCurlCode: (code: CurlCode, method: HttpVerb, url: string, options: Options) => void; export declare const checkGetBodyStatus: (statusCode: number, body: Buffer) => void;