botframework-streaming
Version:
Streaming library for the Microsoft Bot Framework
36 lines • 1.32 kB
TypeScript
/**
* @module botframework-streaming
*/
/**
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License.
*/
import { HttpContent, HttpContentStream } from './httpContentStream';
/**
* The basic response type sent over Bot Framework Protocol 3 with Streaming Extensions transports, equivalent to HTTP response messages.
*/
export declare class StreamingResponse {
statusCode: number;
streams: HttpContentStream[];
/**
* Creates a streaming response with the passed in method, path, and body.
*
* @param statusCode The HTTP verb to use for this request.
* @param body Optional body containing additional information.
* @returns A streaming response with the appropriate statuscode and passed in body.
*/
static create(statusCode: number, body?: HttpContent): StreamingResponse;
/**
* Adds a new stream attachment to this streaming request.
*
* @param content The Http content to include in the new stream attachment.
*/
addStream(content: HttpContent): void;
/**
* Sets the contents of the body of this streaming response.
*
* @param body The JSON text to write to the body of the streaming response.
*/
setBody(body: any): void;
}
//# sourceMappingURL=streamingResponse.d.ts.map