var post = new org.apache.commons.httpclient.methods.PostMethod("https://query.yahooapis.com/v1/public/yql?q="+encodeURIComponent("select item  from weather.forecast where woeid in  (select woeid from geo.places(1) where text='$location')"));
var client = new org.apache.commons.httpclient.HttpClient();

post.setRequestHeader("Content-type", "application/json"); 
post.setRequestHeader("Accept", "application/json");

var status = client.executeMethod(post);
var br = new java.io.BufferedReader(new java.io.InputStreamReader(post.getResponseBodyAsStream()));
var response = "";
var line = br.readLine();
while(line != null){
    response = response + line;
    line = br.readLine();
}
post.releaseConnection();

var item = JSON.parse(response);
requestHeaderMapFromClient.put("title" ,item.query.results.channel.item.title);
requestUrlParamMapFromClient.put("title" ,item.query.results.channel.item.title );
bodyText=  'title:'+ item.query.results.channel.item.title;
JS