Q:

Connect to server with js or jquery

I try connect to server and get data using jQuery. The server asks for a username and password, but I can not find how it is transmitted. After sending the username and password I receive in response to a cookie, which I have to make to the next question.
Screen from Fiddler the better show what's going on: 

When I type the address in the browser:

Cookies is empty, browser display login panel:

When I write login, password and click Ok, two requests are sent with cookies:

How connect this server in js or jquery? 
Think I need to somehow send a username and password, retrieve cookies and then execute another query with the coockie.
Please, any advice, because google will not help.

A:

Your server is using HTTP Authorization to display a restricted page. There are several types of Authorizations, simplest one is HTTP Basic Authorization. In this HTTP Basic Authorization , once user enters the username and password in the displayed login box, base64 encoded value (not encrypted !!!) of 'username:password' will be sent to server in "Authorization" HTTP header.
Authorization: Basic dGVzdHVzZXI6dGVzdHBhc3N3b3Jk

Please see live example (#10) here
But in your case, the server is using NTLM HTTP Authorization, which involves 4-way handshake. I’m not sure, but it should be complicated to complete these steps with javascript.
I strongly recommend you to use JMETER  for this task. JMETER offers HTTP Authorization Manager, that should solve your problem easily. Also, JMETER offers many other features for handling Client-side HTTP tasks.
Good Luck!

