35 lines
No EOL
1.3 KiB
TypeScript
35 lines
No EOL
1.3 KiB
TypeScript
/**
|
|
* @module botbuilder
|
|
*/
|
|
/**
|
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
* Licensed under the MIT License.
|
|
*/
|
|
import { WebResource, HttpOperationResponse, HttpClient } from '@azure/core-http';
|
|
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
|