UNPKG

nyro

Version:

A simple and effective promise-based HTTP & HTTP/2 request library that supports all HTTP methods.

25 lines (24 loc) 630 B
"use strict"; var __importDefault = (this && this.__importDefault) || function (mod) { return (mod && mod.__esModule) ? mod : { "default": mod }; }; Object.defineProperty(exports, "__esModule", { value: true }); const index_1 = __importDefault(require("./index")); (0, index_1.default)({ url: 'http://localhost:3001/v1/chat/completions', method: 'post', headers: { Authorization: 'test' }, body: { messages: [ { role: 'user', content: 'selam nasılsın?' } ] } }).then(res => { }).catch(err => { console.log(err); });