/** * Source: https://github.com/arangodb/arangojs * * Originally licensed under Apache License 2.0 */ import { Errback } from 'arangojs/lib/errback'; import { ClientRequest, IncomingMessage } from 'http'; import { RequestInstrumentation } from './config'; import { RequestOptions as ArangoRequestOptions } from 'arangojs/lib/request.node'; /** * @internal */ export interface ArangojsResponse extends IncomingMessage { request: ClientRequest; body?: any; arangojsHostUrl?: string; } /** * @internal */ export interface ArangojsError extends Error { request: ClientRequest; toJSON: () => Record; } export interface RequestOptions extends ArangoRequestOptions { requestInstrumentation?: RequestInstrumentation; } /** * @internal */ export type RequestFunction = { (options: RequestOptions, cb: Errback): void; close?: () => void; }; export declare const isBrowser = false; export declare function createRequest(baseUrl: string, agentOptions: any, agent: any): RequestFunction;