ithit.webdav.server
Version:
With IT Hit WebDAV Server Engine for Node.js you can create your own WebDAV server, add WebDAV support to your existing Node.js project or DAV-enable your CMS/DMS/CRM.
45 lines (44 loc) • 1.73 kB
TypeScript
/**
* @copyright Copyright (c) 2017 IT Hit. All rights reserved.
*/
/// <reference types="node" />
import { OutgoingHttpHeaders, ServerResponse } from "http";
/**
* Represents HTTP response.
* @remarks You can implement this interface if you host your server in any environment
* and pass it to {@link DavContextBase} constructor.
*/
export declare class DavResponse {
/**
* Sets the HTTP MIME type of the output stream.
* @value The HTTP MIME type of the output stream.
*/
contentType: string;
statusCode: number;
writable: boolean;
statusMessage: string;
/**
* Sets the content length of the output stream.
* @value The value of the response's Content-Length header.
*/
contentLength: number;
/**
* Gets a valus indicating whether client is still connected.
* @remarks Most probably this property will be refreshed only when some data fails to send to client.
*/
readonly isClientConnected: boolean;
outputBuffer: string;
nativeResponce: ServerResponse;
addToOutputBuffer(chunk: string): void;
writeHead(statusCode: number, reasonPhrase?: string, headers?: OutgoingHttpHeaders): void;
end(cb?: () => void): void;
write(chunk: any, encoding?: string, cb?: (error: Error | null | undefined) => void): boolean;
constructor(res: ServerResponse);
setHeader(name: string, value: number | string | string[]): void;
/**
* Adds the specified header and value to the HTTP headers for this response.
* @param name The name of the HTTP header to set.
* @param value The value for the name header.
*/
addHeader(name: string, value: string): void;
}