Последняя версия плагина REST Client для 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
}
}
Как добавить данные заголовка к этому запросу?