us-2020-glue
Use this package to easily communicate YSNSoftware Platform uServices
Examples
'use strict'; const axiosService ctsIdGenerator = ; { try let as = 'https://jsonplaceholder.typicode.com/todos/1' asmethod = asmethodsGET astimeout = 1000 asdata = cts: a: 1 returnCts: true await as ifas throw as console catch error console }
Features
- Get uServices response using GET, POST, PATCH, PUT, DELETE methods
- CTS object send ctsId property generated with inside utility or custom value. Then this is evaluated in STC object response for integrity and consistent response. ( CTS: Client To Server, STC: Server To Client )
Methods for
methods = GET: 'GET' POST: 'POST' DELETE: 'DELETE' PUT: 'PUT' PATCH: 'PATCH'
CTS (Client To Server)
url = ''; method = 'GET'; // [GET, POST, PUT, PATCH, DELETE] timeout = 100; /** * DATA * * JSON Format data sended to uservice */ data = ctsId: // id in constructor method returnCts: false // If true, return cts in response
STC (CServer To Client)
response = success: true // or false message: 'Respuesta exitosa' error: false data: {}
Check Correct equivalent (integrity) response
:bool // true return String message
Comming son
- Basic Auth
- Easy remote uservice identification
- Real Time Communication (Socket), Gateway for remote command
- Glue for Real Time Logs Monitor