Request handling code, working provider/consumer