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.
81 lines (76 loc) • 2.89 kB
TypeScript
/// <reference types="node" />
/**
* @copyright Copyright (c) 2017 IT Hit. All rights reserved.
*/
import { IncomingMessage } from "http";
import { DavEngine } from "../DavEngine";
/**
* Represents an incoming HTTP request.
* @remarks
* @param
* {@link clientLockTokens} property provides access to the lock tokens send by WebDAV client.
* Before modifying locked WebDAV Class 2 server items you must check if client provided necessary lock token.
* @param
* You can derive your class from this class if you host your server in any environment
* and pass it to {@link DavContextBase} constructor.
*/
export declare class DavRequest extends IncomingMessage {
/**
* Gets information about the URL of the current request.
* @value Url, like /somefolder/?query
*/
readonly rawUrl: string;
/**
* Gets concatenated request scheme, host and port, like: http://www.ithit.com:8080
* @value Concatenated scheme, host and port.
*/
readonly urlPrefix: string;
/**
* Gets virtual application root path on the server.
* @value The virtual path of the current application.
*/
readonly applicationPath: string;
/**
* Gets the HTTP method specified by the client.
* @value A String that contains the method used in the request.
*/
readonly httpMethod: string;
/**
* Gets the User-Agent header.
* @value A string representing User-Agent header.
*/
readonly userAgent: string;
/**
* Gets a list of lock tokens submitted by client.
* @value StringCollection object containing collection of lock tokens submitted by client.
* @remarks ClientLockTokens property provides access to the list of lock tokens
* submitted by client. These lock tokens were generated during the call to your {@link ILock.lock}
* method implementation, associated with the item and returned to client.
* When WebDAV client is modifying any server item it
* sends back to server the list of lock tokens. In your WebDAV server Class 2
* implementation before modifying any locked items you must check if WebDAV
* client provided necessary lock token.
*/
readonly clientLockTokens: string[];
url: string;
readonly parsedUrl: string;
body: Buffer;
protocol?: string;
private lockTokens?;
getHeaderValue(name: string): string;
getOverwrite(): boolean;
getXmlContent(engine: DavEngine): Document | null;
getDestination(): string;
getContentRange(): {
unit: string;
first: number | null;
last: number | null;
length: number | null;
} | null;
trimToken(s: string): string;
private parseRange;
/**
* Parse the content-range header.
*/
private parseContentRange;
}