Düzenle

Aracılığıyla paylaş


StreamingHttpClient class

An implementation of HttpClient that adds compatibility with streaming connections.

Constructors

StreamingHttpClient(IStreamingTransportServer)

Creates a new streaming Http client.

Methods

sendRequest(WebResource)

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.

Constructor Details

StreamingHttpClient(IStreamingTransportServer)

Creates a new streaming Http client.

new StreamingHttpClient(server: IStreamingTransportServer)

Parameters

server

IStreamingTransportServer

Transport server implementation to be used.

Method Details

sendRequest(WebResource)

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.

function sendRequest(httpRequest: WebResource): Promise<HttpOperationResponse>

Parameters

httpRequest

WebResource

The outgoing request created by the BotframeworkAdapter.

Returns

Promise<HttpOperationResponse>

The streaming transport compatible response to send back to the client.