public function setHttpBasicAuth($domain, $username, $password) {
        $this->requireOpenConnection();
        $this->requireFeature('authBasic');

        $response = $this->curl(
            'PUT',
            '/proxy/' . $this->port . '/auth/basic/' . urlencode($domain),
            array(
                'username' => $username,
                'password' => $password
            )
        );
    }