UNPKG

1.3 kBTypeScriptView Raw
1/**
2 * @module botbuilder
3 */
4/**
5 * Copyright (c) Microsoft Corporation. All rights reserved.
6 * Licensed under the MIT License.
7 */
8import { WebResource, HttpOperationResponse, HttpClient } from '@azure/core-http';
9import { IStreamingTransportServer } from 'botframework-streaming';
10/**
11 * An implementation of `HttpClient` that adds compatibility with streaming connections.
12 */
13export declare class StreamingHttpClient implements HttpClient {
14 private readonly server;
15 /**
16 * Creates a new streaming Http client.
17 *
18 * @param server Transport server implementation to be used.
19 */
20 constructor(server: IStreamingTransportServer);
21 /**
22 * This function hides the default sendRequest of the HttpClient, replacing it
23 * with a version that takes the WebResource created by the BotFrameworkAdapter
24 * and converting it to a form that can be sent over a streaming transport.
25 *
26 * @param httpRequest The outgoing request created by the BotframeworkAdapter.
27 * @returns The streaming transport compatible response to send back to the client.
28 */
29 sendRequest(httpRequest: WebResource): Promise<HttpOperationResponse>;
30 /**
31 * @private
32 */
33 private mapHttpRequestToProtocolRequest;
34}
35//# sourceMappingURL=streamingHttpClient.d.ts.map
\No newline at end of file