How do I capture the body of my request rest - Grails

0

I have the following REST request in grails:

def http = new HTTPBuilder(instance_domain)
try {
   http.post( path : "AtualizarPedido/"+urlOpportunity.url, body : postBody, requestContentType: URLENC) {
     resp, json ->
        log.info "** Status: $resp.status"
  }
} catch(Exception e){
   log.error "** Error code: ${e}"
   log.error "** Post form: ${postBody}"
}

In the variable $resp.status I have the value 200 , there is something $resp.body to get the return of type:

{
   "instance_url": "http: \ / \ / m ... \ / .. c"
}

Please help me, I've looked at various ways and none of them.

    
asked by anonymous 27.04.2018 / 21:47

0 answers