import { IRequestHandler } from "./i-request-handler";
import { Response } from "../i-response";
import { IFileLoader } from "@wessberg/fileloader";
import { RequestHandlerOptions } from "./request-handler-options";
import { ILoggerService } from "../../logger/i-logger-service";
/**
 * A handler that can handle requests
 */
export declare class RequestHandler implements IRequestHandler {
    private readonly fileLoader;
    private readonly logger;
    constructor(fileLoader: IFileLoader, logger: ILoggerService);
    /**
     * Handles the given request
     * @param {RequestHandlerOptions} options
     * @returns {Promise<Response>}
     */
    handle(options: RequestHandlerOptions): Promise<Response>;
    /**
     * Handles the given GET request
     * @param {IGetRequestHandlerOptions} options
     * @returns {Promise<Response>}
     */
    private handleGetRequest;
    /**
     * Loads the index file
     * @param options
     */
    private loadIndex;
    /**
     * Loads a resource after a normalized path has been computed
     * @param {RequestHandlerOptions} options
     * @param {boolean} isIndex
     * @param {string} normalizedPath
     */
    private loadResourceFromNormalizedPath;
    /**
     * Attempts to load a resource and may return undefined if it didn't succeed
     * @param {RequestHandlerOptions} options
     * @returns {Promise<LoadedResource | undefined>}
     */
    private loadResource;
    /**
     * Gets the file path to a file, including encoding
     * @param {string} path
     * @param {Set<string>} acceptEncoding
     * @returns {Promise<IGetFilepathWithEncodingResult | undefined>}
     */
    private getFilePathWithEncoding;
    /**
     * Loads a given file or returns undefined if it doesn't exist
     * @param {string} path
     * @returns {Promise<Buffer | undefined>}
     */
    private loadFile;
    /**
     * Guesses the type of a file based on its' contents or its' path if all else fails
     * @param {Buffer?} buffer
     * @param {string} path
     * @returns {string}
     */
    private guessFileType;
}
