json - Error with specific name using rest client builder in grails 2.3.4 -
i'm using rest-client-builder:1.0.3 grails plugin communicate rest api dspace. works well:
def resp = rest.post("http://10.42.0.239:8080/rest/login"){ contenttype "application/json" json{ email = "myemail@mail" password = "root" } }
but need send parameter minus sign in way:
def status = rest.get("http://10.42.0.239:8080/rest/status"){ contenttype "application/json" json{ rest-dspace-token = "4506b187-bda8-4db7-801d-635f277d5316" } }
minus signs in rest-dspace-token give next error:
((rest - dspace) - token) binary expression, should variable expression @ line
how can solve ? in advance.
just quote property of delegate:
json{ delegate.'rest-dspace-token' = "4506b187-bda8-4db7-801d-635f277d5316" }
Comments
Post a Comment