The Uniform Resource Identifier (URI) used in the POLL method sent by the client must be the one provided in the Content-Location header and it must match the Subscription-ID Header sent in the same method. If more than one Subscription-ID Header is used, then they must all have the same Content-Location header.
The response to a POLL will contain the Subscription-ID Header with the list of changed subscriptions.
The server will consider the POLL message to be a "refresh" of all subscriptions identified by the Subscription-ID Header.
The POLL method can be used with or without NOTIFY messages being sent from server to client. From the client perspective, a POLL method can be used over a firewall. If a NOTIFY Method callback cannot be used, it is the only way of getting subscriptions. Or, if the NOTIFY Method callback is being used, the client can use the POLL method to refresh the subscription or to confirm (in case the User Datagram Protocol (UDP) packets were dropped) that nothing has happened on the subscription.
|200 (OK)||Successful POLL. Events occurred since last POLL on subscriptions identified in headers. This response code only occurs within a 207 (Multi-Status) response body.|
|204 (No Content)||Successful POLL, but no events occurred. This response code only occurs within a 207 (Multi-Status) response body.|
|207 (Multi-Status)||Status codes appear in the body for the various subscriptions that were polled.|
|401 (Unauthorized)||User does not have access permissions or authorization to POLL this resource. This response code only occurs within a 207 (Multi-Status) response body.|
|404 (Not Found)||Resource was not found. This response code only occurs within a 207 (Multi-Status) response body.|
|406 (Not Acceptable)||POLL contained an Accept header which could not be satisfied by the server. This response code may be used outside of a 207 (Multi-Status) response.|
|412 (Precondition Failed)||A subscription ID in the header did not match the resource named. This could be because the subscription ID does not exist any more. The subscription IDs that did not match are included in a Subscription-ID header in the response.|
The following POLL queries subscriptions 8, 9, 10, 11, and 12 for events. An event was fired for 11 but not for the other subscriptions.
POLL /public/subtest/ HTTP/1.1 Host: www.contoso.com Subscription-ID: 8,9,10,11,12 Content-Length: 0
HTTP/1.1 207 Multi-Status Server: Microsoft-IIS/5.0 Date: Fri, 06 Jul 2001 19:23:12 GMT Content-Type: text/xml Content-Length: 489 <?xml version="1.0"?> <a:multistatus xmlns:b="http://schemas.microsoft.com/Exchange/" xmlns:a="DAV:"> <a:response> <a:href>http://www.contoso.com/public/subtest/ </a:href> <a:status>HTTP/1.1 200 OK</a:status> <b:subscriptionID> <li>11</li> </b:subscriptionID> </a:response> <a:response> <a:href>http://www.contoso.com/public/subtest/ </a:href> <a:status>HTTP/1.1 204 No Content</a:status> <b:subscriptionID> <li>8</li> <li>9</li> <li>10</li> <li>12</li> </b:subscriptionID> </a:response> </a:multistatus>