botframework-streaming
Version:
Streaming library for the Microsoft Bot Framework
47 lines • 1.58 kB
TypeScript
/**
* @module botframework-streaming
*/
/**
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License.
*/
import { HttpContent, HttpContentStream } from './httpContentStream';
/**
* The basic request type sent over Bot Framework Protocol 3 with Streaming Extensions transports, equivalent to HTTP request messages.
*/
export declare class StreamingRequest {
/**
* Request verb, null on responses.
*/
verb: string;
/**
* Request path; null on responses.
*/
path: string;
/**
* List of associated streams.
*/
streams: HttpContentStream[];
/**
* Creates a streaming request with the passed in method, path, and body.
*
* @param method The HTTP verb to use for this request.
* @param path Optional path where the resource can be found on the remote server.
* @param body Optional body to send to the remote server.
* @returns On success returns a streaming request with appropriate status code and body.
*/
static create(method: string, path?: string, body?: HttpContent): StreamingRequest;
/**
* 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 streamingRequest.
*
* @param body The JSON text to write to the body of the streamingRequest.
*/
setBody(body: any): void;
}
//# sourceMappingURL=streamingRequest.d.ts.map