Skip to content

Parse application/x-ndjson responses into structured data #41

@st3v3nmw

Description

@st3v3nmw

snap_http.logs() currently returns raw bytes in result because the /logs endpoint responds with application/x-ndjson rather than application/json. Callers have to manually strip the \x1e record separators and parse each line themselves.

result should instead be a list of dicts. The fix is to handle application/x-ndjson in http.py alongside the existing application/json case: spilt on \x1e and JSON parse each line.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions