Skip to content

Resolution layers

One predictable rule for every API state. laqi does not just let you manipulate responses — it always makes clear why a response was the one that arrived.

Every request laqi answers passes through four layers. The first one that has an opinion wins, and the winner is reported back to you in three places so the panel, the terminal, and your network tab can never disagree.

#LayerSet byPersists
1headerX-Laqi-Response on the requestno
2statea click in the control panelyes
3scenariothe active scenario, if it covers this routeyes
4defaultthe default key in the mock file

Every response carries a header naming the response and the layer that chose it:

$ curl -i 127.0.0.1:8000/todos
HTTP/1.1 200 OK
content-type: application/json
x-laqi-resolved: error (state)

The same string appears in the terminal stream and in the panel’s request log. If you ever wonder why your app is seeing something odd, that one line answers it.