Support for extension methods, getResponseHeader(), and an extra error

Blocks #2525