fix deprecation warnings for getHeader and getHeaders methods refs #228
#7470
mentioned in commit 92229758
mentioned in commit f9572e41