input stream need to suport rest method