mindee
Version:
Mindee Client Library for Node.js
33 lines (32 loc) • 946 B
TypeScript
import { InputSource } from "./inputSource";
import { BytesInput } from "./bytesInput";
export declare class UrlInput extends InputSource {
readonly url: string;
constructor({ url }: {
url: string;
});
init(): Promise<void>;
private fetchFileContent;
saveToFile(options: {
filepath: string;
filename?: string;
username?: string;
password?: string;
token?: string;
headers?: Record<string, string>;
maxRedirects?: number;
}): Promise<string>;
asLocalInputSource(options?: {
filename?: string;
username?: string;
password?: string;
token?: string;
headers?: Record<string, string>;
maxRedirects?: number;
}): Promise<BytesInput>;
private static extractFilenameFromUrl;
private static generateFileName;
private static getFileExtension;
private fillFilename;
private makeRequest;
}