4.2 Issue ROP Commands to the Server
In this scenario the client sends a request, as described in section 22.214.171.124, containing ROPs to the server using the Execute request type, as described in section 126.96.36.199.1, including a <REQUEST BODY> as described in section 188.8.131.52.1. As described in section 184.108.40.206, the request includes all the cookies related to the Session Context that the client has saved.
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> <REQUEST BODY>
The response to an Execute request type is "chunked", as described in section 220.127.116.11. 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 18.104.22.168.3, for the completed response; and the Execute request type request body.
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> <CRLF> C<CRLF> PROCESSING<CRLF> <CRLF>
Every 15 seconds, as indicated by the value of the X-PendingPeriod header described in section 22.214.171.124.5, the server returns another keep-alive chunk:
9<CRLF> PENDING<CRLF> <CRLF>
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.
?<CRLF> DONE<CRLF> X-ResponseCode: 0<CRLF> X-ElapsedTime: <milliseconds> X-StartTime: <date/time> <CRLF> <RESPONSE BODY><CRLF> <CRLF> 0<CRLF> <CRLF>