It won't get called unless the web server returns an HTTP status 401. This in unlikely if you are passing valid credentials appropriate to the web site/page in the headers/payload of the request. You seem to be doing that above.