node-libcurl

    Interface CurlyFunction

    interface CurlyFunction {
        acl: CurlyHttpMethodCall;
        bind: CurlyHttpMethodCall;
        checkout: CurlyHttpMethodCall;
        connect: CurlyHttpMethodCall;
        copy: CurlyHttpMethodCall;
        create: (defaultOptions?: CurlyOptions) => CurlyFunction;
        defaultResponseBodyParsers: CurlyResponseBodyParsersProperty;
        delete: CurlyHttpMethodCall;
        get: CurlyHttpMethodCall;
        head: CurlyHttpMethodCall;
        link: CurlyHttpMethodCall;
        lock: CurlyHttpMethodCall;
        "m-search": CurlyHttpMethodCall;
        merge: CurlyHttpMethodCall;
        mkactivity: CurlyHttpMethodCall;
        mkcalendar: CurlyHttpMethodCall;
        mkcol: CurlyHttpMethodCall;
        move: CurlyHttpMethodCall;
        notify: CurlyHttpMethodCall;
        options: CurlyHttpMethodCall;
        patch: CurlyHttpMethodCall;
        post: CurlyHttpMethodCall;
        propfind: CurlyHttpMethodCall;
        proppatch: CurlyHttpMethodCall;
        purge: CurlyHttpMethodCall;
        put: CurlyHttpMethodCall;
        rebind: CurlyHttpMethodCall;
        report: CurlyHttpMethodCall;
        search: CurlyHttpMethodCall;
        setObjectPoolLimit: (limit: number) => void;
        source: CurlyHttpMethodCall;
        subscribe: CurlyHttpMethodCall;
        trace: CurlyHttpMethodCall;
        unbind: CurlyHttpMethodCall;
        unlink: CurlyHttpMethodCall;
        unlock: CurlyHttpMethodCall;
        unsubscribe: CurlyHttpMethodCall;
        <ResultData = any>(
            url: string,
            options?: CurlyOptions,
        ): Promise<CurlyResult<ResultData>>;
    }

    Hierarchy

    • HttpMethodCalls
      • CurlyFunction
    • EXPERIMENTAL This API can change between minor releases

      Async wrapper around the Curl class.

      It's also possible to request using a specific http verb directly by using curl.<http-verb>(url: string, options?: CurlyOptions), like:

      curly.get('https://www.google.com')
      

      Type Parameters

      • ResultData = any

        You can use this to specify the type of the data property returned from this call.

      Parameters

      Returns Promise<CurlyResult<ResultData>>

    Index

    Properties

    create: (defaultOptions?: CurlyOptions) => CurlyFunction

    EXPERIMENTAL This API can change between minor releases

    This returns a new curly with the specified options set by default.

    defaultResponseBodyParsers: CurlyResponseBodyParsersProperty

    These are the default response body parsers to be used.

    By default there are parsers for the following:

    • application/json
    • text/*

    post

    setObjectPoolLimit: (limit: number) => void

    Set the object pool limit for Curl instances.

    When set to 0 (default), pooling is disabled and Curl instances are created/destroyed on each request. When set to a positive number, that many Curl instances will be pre-created and reused.

    Type Declaration

      • (limit: number): void
      • Parameters

        • limit: number

          Number of Curl instances to keep in the pool. 0 disables pooling.

        Returns void

    unsubscribe: CurlyHttpMethodCall
    MMNEPVFCICPMFPCPTTAAATR