fixes bug with gzip check in _apiRequest