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
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.
Meanwhile, gh api /octocat (without --verbose) works correctly and displays the octocat ASCII art. The same applies to other tools like
curlandwget.Root Cause
The inspectableMIMEType determines which response bodies get logged. This function is used in the httpretty logger's body filter. Since
application/octocat-streamdoesn't match any of these patterns, the body gets filtered out.Proposed fix
Add
application/octocat-streamto the list of inspectable MIME types