UNPKG

@eclipse-ditto/ditto-javascript-client-node

Version:

Node.js(r) implementation of Eclipse Ditto JavaScript API.

38 lines 1.5 kB
/*! * Copyright (c) 2019 Contributors to the Eclipse Foundation * * See the NOTICE file(s) distributed with this work for additional * information regarding copyright ownership. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License 2.0 which is available at * http://www.eclipse.org/legal/epl-2.0 * * SPDX-License-Identifier: EPL-2.0 */ import { HttpRequester } from '../../api/src/client/request-factory/http-request-sender'; import { GenericResponse } from '../../api/src/model/response'; import { ProxyAgent } from './proxy-settings'; /** * NodeJs implementation of a Http Requester. */ export declare class NodeRequester implements HttpRequester { private readonly agent; constructor(agent: ProxyAgent); private static createResponseHandler; private static handleResponse; doRequest(method: string, url: string, header: Map<string, string>, payload: string): Promise<GenericResponse>; /** * Builds an options object to perform a Http request with. * * @param method - The type of action to perform. * @param parsedUrl - The Url to send the request to. * @param header - The headers of the request. * @param body - The payload to send with the request. * @param isSecureRequest - If the request is a secure HTTPS request. * @return the builder. */ private buildRequest; private getAgentForRequestType; } //# sourceMappingURL=node-http.d.ts.map