Description
Users currently pipe output to files, but this captures formatted/colored output rather than raw response. A dedicated flag should save the raw body.
Proposed Implementation
kurl https://api.example.com/image.png -o image.png
kurl https://api.example.com/data.json -o ./data.json --no-color
Why this matters
Piping formatted JSON with color codes to a file corrupts the data. A dedicated flag ensures raw binary/text output.
Acceptance Criteria
Getting Started
Intercept the response body before formatting. Write to io.Writer that either goes to stdout or the file based on flag.
Description
Users currently pipe output to files, but this captures formatted/colored output rather than raw response. A dedicated flag should save the raw body.
Proposed Implementation
Why this matters
Piping formatted JSON with color codes to a file corrupts the data. A dedicated flag ensures raw binary/text output.
Acceptance Criteria
-o/--outputflagGetting Started
Intercept the response body before formatting. Write to
io.Writerthat either goes to stdout or the file based on flag.