Skip to content

HTTP Loop Connection

HTTP loop is the request-response transport alternative to websocket sessions.

Endpoint summary

MethodPathPurpose
POST/mdp/http-loop/connectCreate a loop session
POST/mdp/http-loop/sendSend one client-to-server MDP message
GET/mdp/http-loop/pollReceive one server-to-client MDP message
POST/mdp/http-loop/disconnectClose the loop session

Session identification

After connect, later requests must include the session ID in either:

  • the x-mdp-session-id header
  • the sessionId query parameter

Connect

Request:

json
{}

Response:

json
{
  "sessionId": "6c8a3b2b-7f2b-4be5-a2d8-1f0c8c4f8b54"
}

Polling flow

  1. POST /connect
  2. send registerClient through /send
  3. optionally send updateClientCatalog through /send when the local path catalog changes
  4. GET /poll until the server returns callClient or 204
  5. send callClientResult through /send
  6. POST /disconnect

waitMs on /poll is clamped to 60000.

Sequence diagram

For request and response details per endpoint, continue with:

Use it when

  • the runtime cannot keep a websocket open
  • the environment only supports plain HTTP request-response loops

Model Drive Protocol