renamed apiHeaders to headers and used an object rather than array of arrays to describe headers