-
Notifications
You must be signed in to change notification settings - Fork 68
Open
Description
Relates to: github/rest-api-description#5178
When using the GitHub CLI with --verbose flag on endpoints that return non-standard content types (like application/octocat-stream from /octocat), the response body is not displayed even though the request succeeds.
$ gh api --verbose /octocat
* Request at 2026-01-27 15:15:09.70376 -0600 CST m=+0.070954459
* Request to https://api.github.com/octocat
> GET /octocat HTTP/1.1
> Host: api.github.com
...
< HTTP/2.0 200 OK
< Content-Type: application/octocat-stream
...
# No response body shown! 😿
Meanwhile, gh api /octocat (without --verbose) works correctly and displays the octocat ASCII art. The same applies to other tools like curl and wget.
Root Cause
The inspectableMIMEType determines which response bodies get logged. This function is used in the httpretty logger's body filter. Since application/octocat-stream doesn't match any of these patterns, the body gets filtered out.
Proposed fix
Add application/octocat-stream to the list of inspectable MIME types
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels