{ "moduleId": "test", "id": "conditional", "type": "HTTP", "imports": { "c2dfa57f-e73e-452a-8707-db7a451965ce": { "id": "c2dfa57f-e73e-452a-8707-db7a451965ce", "versionId": "c2dfa57f-e73e-452a-8707-db7a451965ce", "type": "cloud" } }, "handlers": { "onStart": "a5CL6vND6LqD4XOIaMPCO" }, "instructions": [ { "id": "0", "type": "defineFunction", "name": "Handle HTTP request", "version": "1.0.0", "parameters": [], "body": [ { "type": "if", "id": "1", "condition": "request.query.name == \"John\"", "then": [ { "type": "call", "id": "1a", "callee": "import/c2dfa57f-e73e-452a-8707-db7a451965ce/respond_with", "parameters": [ { "type": "tel", "name": "body", "expression": "{ msg: \"Hello John!\" }" } ], "version": "0.0.1" }, { "type": "return", "id": "1b", "value": "", "parameters": [], "version": "0.0.1" } ], "version": "0.0.1" }, { "type": "call", "id": "2", "callee": "import/c2dfa57f-e73e-452a-8707-db7a451965ce/respond_with", "parameters": [ { "type": "tel", "name": "body", "expression": "{ msg: \"Hello Stranger!\" }" } ], "version": "0.0.1" } ] }, { "type": "defineFunction", "name": "On start", "description": "Initializes this module.", "exported": false, "parameters": [], "annotations": [], "id": "a5CL6vND6LqD4XOIaMPCO", "body": [ { "type": "call", "callee": "import/c2dfa57f-e73e-452a-8707-db7a451965ce/setup_route", "parameters": [ { "type": "tel", "name": "method", "expression": "\"get\"" }, { "type": "functionRef", "name": "onHttpRequest", "id": "0" }, { "type": "tel", "name": "path", "expression": "\"/conditional\"" } ], "id": "ObDqDqaFfGHCZA0-idtFI" } ] } ] }