Fixed scope issue and removed next()

The "requests" parameter was causing infinite loops and next() method was causing response to be emptied.