iam trying to call the nest/node api in crafter cms but it is throwing errors
1)This is my Groovy controller code
import groovy.json.JsonSlurper
def apiUrl = "http://localhost:3000/"
def json = new URL(apiUrl).text //assuming it's json
def object = new JsonSlurper().parseText(json)
templateModel.myObject
2)This is my ftl code
<#import "/templates/system/common/crafter.ftl" as crafter />
<#assign x = contentModel.name_s!"" />
<@crafter.h1>${myObject.x}<@crafter.h1 />
3)after saving the above codes iam getting this error