import { IRequestHandler } from "./i-request-handler";
import { Response } from "../i-response";
import { IFileLoader } from "@wessberg/fileloader";
import { RequestHandlerOptions } from "./request-handler-options";
/**
 * A handler that can handle requests
 */
export declare class RequestHandler implements IRequestHandler {
    private readonly fileLoader;
    constructor(fileLoader: IFileLoader);
    /**
     * Handles the given request
     * @param {RequestHandlerOptions} options
     * @returns {Promise<Response>}
     */
    handle(options: RequestHandlerOptions): Promise<Response>;
    /**
     * Handles the given GET request
     * @param {RequestHandlerOptions} options
     * @returns {Promise<Response>}
     */
    private handleGetRequest(options);
    /**
     * Attempts to load a resource and may return undefined if it didn't succeed
     * @param {RequestHandlerOptions} options
     * @returns {Promise<ILoadedResource | undefined>}
     */
    private loadResource(options);
    /**
     * Loads a file, optionally encoded if it exists and if the given set of accepted encodings
     * include it
     * @param {string} path
     * @param {Set<string>} acceptEncoding
     * @returns {Promise<ILoadFileWithEncodingResult | undefined>}
     */
    private loadFileWithEncoding(path, acceptEncoding?);
    /**
     * Loads a given file or returns undefined if it doesn't exist
     * @param {string} path
     * @returns {Promise<Buffer | undefined>}
     */
    private loadFile(path);
    /**
     * 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(buffer, path);
}
