The existing apexrest method had a way to specify extra headers, so I decided to add that capability to the lower level ajax method.