public static Object head(ActionContext actionContext) throws Exception{
Thing self = (Thing) actionContext.get("self");
String uri = (String) self.doAction("getUri", actionContext);
HttpHead httpRequest = new HttpHead(uri);
Header[] headers = (Header[]) self.doAction("getHeaders", actionContext);
if(headers != null){
httpRequest.setHeaders(headers);
}
HttpParams params = (HttpParams) self.doAction("getHttpParams", actionContext);
if(params != null){
httpRequest.setParams(params);
}
HttpClientActions.initRequest(self, httpRequest, actionContext);
return doRequest(self, httpRequest, actionContext);
}