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