4.2 Issue ROP Commands to the Server

In this scenario the client sends a request, as described in section, containing ROPs to the server using the Execute request type, as described in section, including a <REQUEST BODY> as described in section As described in section, the request includes all the cookies related to the Session Context that the client has saved.

Client request

 POST <Autodiscover-provided endpoint> HTTP/1.1
 Host: <URL of the host server>
 Content-Length: <length of REQUEST BODY>
 Content-Type: application/mapi-http
 Cookie: <session context cookie>=<opaque string>
 Cookie: <return sequence cookie>=<opaque string>
 X-RequestType: Execute
 X-ClientInfo: <opaque string>
 X-RequestId: <unique identifier>
 X-ClientApplication: <client version>

The response to an Execute request type is "chunked", as described in section The initial response contains the PROCESSING meta-tag, as described in section 2.2.7. Depending on how long the processing takes, the initial response is followed by interim "keep-alive" responses containing the PENDING meta-tag. When the processing is completed, the final chunk contains the DONE meta-tag; the X-ResponseCode value, as described in section, for the completed response; and the Execute request type request body.

Server response

 HTTP/1.1 200 OK
 Transfer-Encoding: chunked
 Content-Type: application/mapi-http
 Cookie: MapiContext=<opaque string>
 Cookie: MapiSequence=<opaque string>
 X-PendingPeriod: 15000
 X-RequestType: Execute
 X-RequestId: <unique identifier>
 X-ResponseCode: 0
 X-ClientInfo: <opaque string>
 X-ServerApplication: <server version>
 X-ExpirationInfo: <milliseconds>

Every 15 seconds, as indicated by the value of the X-PendingPeriod header described in section, the server returns another keep-alive chunk:


When the request finally completes, the server returns the DONE meta-tag, followed by the <RESPONSE BODY>. The final character is "0", which is the last-chunk indicator, as described in [RFC2616] section 3.6.1.

 X-ResponseCode: 0<CRLF>
 X-ElapsedTime: <milliseconds>
 X-StartTime: <date/time>