Skip to content

loreanvictor/tyfon-client

Repository files navigation

tyfon-client

An isomorphic http client for connecting to TyFON servers.

👉 Read this for more information.


Installation

npm i tyfon-client

Usage

import { invoke } from 'tyfon-client';

invoke('http://my-tyfon-server.cloud', 'methodName', 'arg1', { hellow: 'world' }, 42, ...)
  .then(console.log)
  .catch(err => { /* OOPS */ })
;

The address given MUST correspond to a TyFON server, where methodName is a remote function served by the server. tyfon-conventions will be used to turn the given method name into proper URL endpoint and HTTP method, and arguments will be JSON-serialized and attached to request body or query parameters (based on resolved HTTP method).

👉 Learn more about TyFON

About

client-code for TyFON

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published