adding the ability to pass apikey in as a header (also added unit test)