Latest version of the REST Client plugin for grails:
withHttp(uri: "http://foo/bar") {
def bodyContent = [
apiKey: "somekey",
identifier: identity.identity,
activity: ac as JSON
]
def json = post(path: 'activity', body: bodyContent)
if (json.stat == 'ok') {
wsr.success = true
}
}
How do I add header data to this request?