Fixed the set_basic_auth params in the code example to include hostname in set_basic_auth.