UNPKG

tgapi

Version:

Actual Telegram bot API with Rx-driven updates and full Flow type coverage

11 lines (6 loc) 252 B
/* @flow */ import fetch from 'isomorphic-fetch' import type { APIRequest } from './privates' const json = res => res.json() export const callMethod = (request: APIRequest) => fetch(request.url, { method: 'POST', body: request.body }).then(json)