Add serialize method on request object