changed to allow adding any extra headers to the underlying curl requests through a method instead of the constructor