URI uri = new URI(nettyRequest.getUri());
RestRequestBuilder builder = new RestRequestBuilder(uri);
builder.setMethod(nettyRequest.getMethod().getName());
for (Map.Entry<String, String> e : nettyRequest.getHeaders())
{
builder.unsafeAddHeaderValue(e.getKey(), e.getValue());
}
ChannelBuffer buf = nettyRequest.getContent();
if (buf != null)
{
if (buf.hasArray())