UNPKG

n8n-nodes-base

Version:

Base nodes of n8n

25 lines 859 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.openThesaurusApiRequest = openThesaurusApiRequest; const n8n_workflow_1 = require("n8n-workflow"); async function openThesaurusApiRequest(method, resource, body = {}, qs = {}, uri, option = {}) { try { let options = { headers: { 'User-Agent': 'https://n8n.io', }, method, qs, body, uri: uri || `https://www.openthesaurus.de${resource}`, json: true, }; options = Object.assign({}, options, option); options.qs.format = 'application/json'; return await this.helpers.request(options); } catch (error) { throw new n8n_workflow_1.NodeApiError(this.getNode(), error); } } //# sourceMappingURL=GenericFunctions.js.map