Renamed getHeaders in buildHeaders to match buildQuery syntax