Add api documentation for getAllHeaders

Fixes #3992