researchIdeas-spec Pub

// $msg etrieve.status // $mock etrieve.status // => (errcode = 0) // {{template etrieve.status:request:content-type="application/json"}} // GET /diesel/mock/etrieve.status // content-type: application/json // {{/template}} // {{template etrieve.status:response:content-type="application/json"}} // { // "timestamp": "2019-04-18T20:32:10.854Z", // "source": "ESB.dev", // "status": "S", // "buildNumber": "1.47", // "buildTimestamp": "2019-04-17T14:57:42-04:00", // "appDistName": "transprt-1.47", // "serverIp": "10.111.0.39" // } // {{/template}} // $val objsample = { // msg:"etrieve.status", // type:"request", // 'content-type':"application/json", // verb:"GET", // url:"/diesel/mock/etrieve.status" // } // THIS IS REALLY GOOD BECAUSE It's a direct replacement of dialogues. We can use JSON schema for payload description etc... // when invoking a message synchronously like this, we can just pass a single ovject iwth all the attributesm // $val objsample = snakk.json ({ // msg:"etrieve.status", // type:"request", // 'content-type':"application/json", // verb:"GET", // url:"/diesel/mock/etrieve.status" // }) // // sync obj // $val objsample = snakk.json ({ // url:"/diesel/mock/etrieve.status" // }) // // sync func // $val objsample = snakk.json (url = "/diesel/mock/etrieve.status") // // async func // $send snakk.json (url = "/diesel/mock/etrieve.status") // $send ctx.set(objsample = payload)


Was this useful?    

By: Razie | 2019-04-18 .. 2021-02-02 | Tags: spec , dsl , research , private


Viewed 560 times ( | History | Print ) this page.

You need to log in to post a comment!

© Copyright DieselApps, 2012-2024, all rights reserved.