added input stream method for curl session