botbuilder
Version:
Bot Builder is a framework for building rich bots on virtually any platform.
35 lines • 1.35 kB
TypeScript
/**
* @module botbuilder
*/
/**
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License.
*/
import { WebResourceLike as WebResource, HttpOperationResponse, HttpClient } from 'botbuilder-stdlib/lib/azureCoreHttpCompat';
import { IStreamingTransportServer } from 'botframework-streaming';
/**
* An implementation of `HttpClient` that adds compatibility with streaming connections.
*/
export declare class StreamingHttpClient implements HttpClient {
private readonly server;
/**
* Creates a new streaming Http client.
*
* @param server Transport server implementation to be used.
*/
constructor(server: IStreamingTransportServer);
/**
* This function hides the default sendRequest of the HttpClient, replacing it
* with a version that takes the WebResource created by the BotFrameworkAdapter
* and converting it to a form that can be sent over a streaming transport.
*
* @param httpRequest The outgoing request created by the BotframeworkAdapter.
* @returns The streaming transport compatible response to send back to the client.
*/
sendRequest(httpRequest: WebResource): Promise<HttpOperationResponse>;
/**
* @private
*/
private mapHttpRequestToProtocolRequest;
}
//# sourceMappingURL=streamingHttpClient.d.ts.map