Skip to content

Instantly share code, notes, and snippets.

@towc
Created April 20, 2026 09:40
Show Gist options
  • Select an option

  • Save towc/49b174191cdf960d783808f51ca23706 to your computer and use it in GitHub Desktop.

Select an option

Save towc/49b174191cdf960d783808f51ca23706 to your computer and use it in GitHub Desktop.
from httpie.core import main
from httpie.context import Environment
import io
env = Environment(
stdin=io.BytesIO(), # --ignore-stdin probably doesn't work unless from a new process, but maybe we can override it directly?
stdout=io.BytesIO(),
stderr=io.BytesIO(),
)
main(args=['http', 'GET', 'https://httpbin.org/get'], env=env)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment