No longer using request as iterator

The api "header in request" doesn't work with recent pyramid versions. Corrected it.