HTTP Loop Connection
HTTP loop is the request-response transport alternative to websocket sessions.
Endpoint summary
| Method | Path | Purpose |
|---|---|---|
POST | /mdp/http-loop/connect | Create a loop session |
POST | /mdp/http-loop/send | Send one client-to-server MDP message |
GET | /mdp/http-loop/poll | Receive one server-to-client MDP message |
POST | /mdp/http-loop/disconnect | Close the loop session |
Session identification
After connect, later requests must include the session ID in either:
- the
x-mdp-session-idheader - the
sessionIdquery parameter
Connect
Request:
json
{}Response:
json
{
"sessionId": "6c8a3b2b-7f2b-4be5-a2d8-1f0c8c4f8b54"
}Polling flow
POST /connect- send registerClient through
/send - optionally send updateClientCatalog through
/sendwhen the local path catalog changes GET /polluntil the server returns callClient or204- send callClientResult through
/send POST /disconnect
waitMs on /poll is clamped to 60000.
Sequence diagram
For request and response details per endpoint, continue with:
- POST /mdp/http-loop/connect
- POST /mdp/http-loop/send
- GET /mdp/http-loop/poll
- POST /mdp/http-loop/disconnect
Use it when
- the runtime cannot keep a websocket open
- the environment only supports plain HTTP request-response loops