Hi,

I use following Groovy code to post a json object to a T5 app:

def http = new HTTPBuilder( "http://wwww.sample.com"; )
http.request( POST, JSON ) { req ->
                uri.path = "updateproc/1/2/3"
                body =  [ status : 'update!' , source : 'httpbuilder' ] 
                requestContentType = ContentType.URLENC
                response.success = { resp, json ->
                println resp.status
                        println json
            }
        }
}

in t5, how to get the one posted in the body? I can't find that info in
query string and others.

  @Inject
    private RequestGlobals requestGlobals;

    Object onActivate() {
       
System.out.println(requestGlobals.getHTTPServletRequest().getQueryString());
        System.out.println(requestGlobals.getRequest().getParameterNames());
       
System.out.println(requestGlobals.getHTTPServletRequest().toString());
        return getFailed();
    }


--
View this message in context: 
http://tapestry.1045711.n5.nabble.com/T5-accessing-json-objects-posted-in-body-from-Groovy-tp4581287p4581287.html
Sent from the Tapestry - User mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org

Reply via email to