code: @SuppressWarnings("unchecked")
  	@Override
  	public <T extends Resource> T request(final HttpRequestBase request) {
  		try {
  			HttpResponse response = execute(client, request);
  			Resource resource = toPage(request, response);
  			return (T)resource;
  		} catch (Exception e) {
  			throw MechanizeExceptionFactory.newException(e);
  		}
  	}
docs: Returns the resource received uppon the request. The resource can be casted to any expected subclass of resource
  but will fail with ClassCastException if the expected type of resource is not the actual returned resource.