added hex fetch support. Currently requires filetype to be specified with type query parameter.