Skip to main content

handle_viewer_history

Function handle_viewer_history 

Source
pub(crate) async fn handle_viewer_history(
    __arg0: State<AppState>,
    __arg1: Extension<ViewerCaller>,
    __arg2: Path<String>,
    __arg3: Query<HistoryQuery>,
    uri: Uri,
    headers: HeaderMap,
) -> Response
Expand description

GET /agentmux/viewer/agents/:name/history?before=<gen:line>&limit=: {gen, from_line, before, lines, more}, the lines from_line..before; more when there are older ones. 404 for an agent that isn’t this channel’s or is hidden, 400 for a malformed before or one past the end, 409 gen_changed. A computer’s read is signed as its feed open is (http_viewer_computers::refuse_unsigned_open), over the path and the query, so a page asked for is the page signed for; its token alone reads nothing.