Added support for headers, basic auth test.