4 Protocol Examples

An HTTP 1.1 client requests a resource from a server by sending an HTTP GET request as shown in the example below:

 GET /test.htm HTTP/1.1
 User-Agent: WHttpTst Test Harness
 Host: webctestlive.ntdev.corp.microsoft.com:543

In this message the client is issuing an HTTP GET request to the server for the resource "test.htm".

The resource requested by the client requires client authentication. The server sends an HTTP response indicating this to the client, as shown in the example below:

 HTTP/1.1 401 Unauthorized
 Server: CHATS
 Content-Length: 0
 WWW-Authenticate: Nego2 YIIBpAYGKwYBBQUCoIIBmDCCAZSgGjAYB ...

In this message the server sends an HTTP 401 response to tell the client that it has to authenticate in order to access the requested resource. The server sets the value of the WWW-Authenticate header to "Nego 2" to indicate to the client that this is the scheme that will be used to authenticate.

Subsequently, the HTTP 1.1 client requests a resource from a server by issuing an HTTP GET request. The client also provides authentication information to the server as shown in the example below:

 GET /test.htm HTTP/1.1
 User-Agent: WHttpTst Test Harness
 Host: webctestlive.ntdev.corp.microsoft.com:543
 Authorization: Nego2 YIIEawYGKwYBBQUCoIIEXzCCBFugDjAMBgorBg ...

In this message the client is issuing an HTTP GET request to the server for the resource "test.htm". The client also sets the Authorization header to "Nego 2" and provides the necessary authentication information to authenticate to the server using this scheme.

Show: