UNPKG

nyro

Version:

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

25 lines (19 loc) 389 B
import nyro from './index'; nyro({ 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); })