HTTP Client for Functional TypeScript.
See the main docs for more info on FTS in general.
Note that this client is optional, as FTS HTTP endpoints may be called using any HTTP request library.
The advantage to using this client library is that it performs parameter and return value validation as well as handling JSON encoding / decoding. The custom encoding / decoding is really only used for non-JSON primitive types such as
Say we have the following FTS function:
You can invoke this function remotely with the following client code:
// previously generated fts definition// URL of an fts-http handler endpoint// create a client that will be used to call the remote FTS function// You may either call the remote function with the same signature as the// original TS function or with an object of named parameters
MIT © Saasify