UNPKG

tika-api

Version:
12 lines (11 loc) 303 B
export default class Detect { constructor(API) { this.api = API; } async detectTypeFromContent(content /*buffer, stream, blob or plain string*/) { const req = await this.api.newBaseRequest('PUT'); req.path = '/detect/stream'; req.body = content; return await req.exec(); } }