Full Code of httpie/cli for AI

master 5b604c37c6c6 cached
261 files
965.9 KB
253.9k tokens
1196 symbols
1 requests
Download .txt
Showing preview only (1,034K chars total). Download the full file or copy to clipboard to get everything.
Repository: httpie/cli
Branch: master
Commit: 5b604c37c6c6
Files: 261
Total size: 965.9 KB

Directory structure:
gitextract__pn2_t9i/

├── .editorconfig
├── .github/
│   ├── ISSUE_TEMPLATE/
│   │   ├── bug_report.md
│   │   ├── feature_request.md
│   │   └── other.md
│   ├── dependabot.yml
│   └── workflows/
│       ├── benchmark.yml
│       ├── code-style.yml
│       ├── content.yml
│       ├── coverage.yml
│       ├── docs-check-markdown.yml
│       ├── docs-deploy.yml
│       ├── release-brew.yml
│       ├── release-choco.yml
│       ├── release-linux-standalone.yml
│       ├── release-pypi.yml
│       ├── release-snap.yml
│       ├── stale.yml
│       ├── test-package-linux-snap.yml
│       ├── test-package-mac-brew.yml
│       └── tests.yml
├── .gitignore
├── .packit.yaml
├── AUTHORS.md
├── CHANGELOG.md
├── CODE_OF_CONDUCT.md
├── CONTRIBUTING.md
├── LICENSE
├── MANIFEST.in
├── Makefile
├── README.md
├── SECURITY.md
├── docs/
│   ├── README.md
│   ├── config.json
│   ├── contributors/
│   │   ├── README.md
│   │   ├── fetch.py
│   │   ├── generate.py
│   │   ├── people.json
│   │   └── snippet.jinja2
│   ├── installation/
│   │   ├── README.md
│   │   ├── generate.py
│   │   ├── installation.jinja2
│   │   └── methods.yml
│   ├── markdownlint.rb
│   └── packaging/
│       ├── README.md
│       ├── brew/
│       │   ├── README.md
│       │   ├── httpie.rb
│       │   └── update.sh
│       ├── linux-arch/
│       │   ├── PKGBUILD
│       │   └── README.md
│       ├── linux-centos/
│       │   └── README.md
│       ├── linux-debian/
│       │   └── README.md
│       ├── linux-fedora/
│       │   ├── README.md
│       │   ├── httpie.spec.txt
│       │   └── update.sh
│       ├── mac-ports/
│       │   ├── Portfile
│       │   └── README.md
│       ├── snapcraft/
│       │   └── README.md
│       └── windows-chocolatey/
│           ├── README.md
│           ├── httpie.nuspec
│           └── tools/
│               ├── chocolateyinstall.ps1
│               └── chocolateyuninstall.ps1
├── extras/
│   ├── httpie-completion.bash
│   ├── httpie-completion.fish
│   ├── man/
│   │   ├── http.1
│   │   ├── httpie.1
│   │   └── https.1
│   ├── packaging/
│   │   └── linux/
│   │       ├── Dockerfile
│   │       ├── README.md
│   │       ├── build.py
│   │       ├── get_release_artifacts.sh
│   │       └── scripts/
│   │           ├── hooks/
│   │           │   └── hook-pip.py
│   │           ├── http_cli.py
│   │           └── httpie_cli.py
│   ├── profiling/
│   │   ├── README.md
│   │   ├── benchmarks.py
│   │   └── run.py
│   └── scripts/
│       └── generate_man_pages.py
├── httpie/
│   ├── __init__.py
│   ├── __main__.py
│   ├── adapters.py
│   ├── cli/
│   │   ├── __init__.py
│   │   ├── argparser.py
│   │   ├── argtypes.py
│   │   ├── constants.py
│   │   ├── definition.py
│   │   ├── dicts.py
│   │   ├── exceptions.py
│   │   ├── nested_json/
│   │   │   ├── __init__.py
│   │   │   ├── errors.py
│   │   │   ├── interpret.py
│   │   │   ├── parse.py
│   │   │   └── tokens.py
│   │   ├── options.py
│   │   ├── requestitems.py
│   │   └── utils.py
│   ├── client.py
│   ├── compat.py
│   ├── config.py
│   ├── context.py
│   ├── cookies.py
│   ├── core.py
│   ├── downloads.py
│   ├── encoding.py
│   ├── internal/
│   │   ├── __build_channel__.py
│   │   ├── __init__.py
│   │   ├── daemon_runner.py
│   │   ├── daemons.py
│   │   └── update_warnings.py
│   ├── legacy/
│   │   ├── __init__.py
│   │   ├── v3_1_0_session_cookie_format.py
│   │   └── v3_2_0_session_header_format.py
│   ├── manager/
│   │   ├── __init__.py
│   │   ├── __main__.py
│   │   ├── cli.py
│   │   ├── compat.py
│   │   ├── core.py
│   │   └── tasks/
│   │       ├── __init__.py
│   │       ├── check_updates.py
│   │       ├── export_args.py
│   │       ├── plugins.py
│   │       └── sessions.py
│   ├── models.py
│   ├── output/
│   │   ├── __init__.py
│   │   ├── formatters/
│   │   │   ├── __init__.py
│   │   │   ├── colors.py
│   │   │   ├── headers.py
│   │   │   ├── json.py
│   │   │   └── xml.py
│   │   ├── lexers/
│   │   │   ├── __init__.py
│   │   │   ├── common.py
│   │   │   ├── http.py
│   │   │   ├── json.py
│   │   │   └── metadata.py
│   │   ├── models.py
│   │   ├── processing.py
│   │   ├── streams.py
│   │   ├── ui/
│   │   │   ├── __init__.py
│   │   │   ├── man_pages.py
│   │   │   ├── palette.py
│   │   │   ├── rich_help.py
│   │   │   ├── rich_palette.py
│   │   │   ├── rich_progress.py
│   │   │   └── rich_utils.py
│   │   ├── utils.py
│   │   └── writer.py
│   ├── plugins/
│   │   ├── __init__.py
│   │   ├── base.py
│   │   ├── builtin.py
│   │   ├── manager.py
│   │   └── registry.py
│   ├── sessions.py
│   ├── ssl_.py
│   ├── status.py
│   ├── uploads.py
│   └── utils.py
├── pytest.ini
├── setup.cfg
├── setup.py
├── snapcraft.yaml
└── tests/
    ├── README.md
    ├── __init__.py
    ├── client_certs/
    │   ├── client.crt
    │   ├── client.key
    │   ├── client.pem
    │   └── password_protected/
    │       ├── client.key
    │       └── client.pem
    ├── conftest.py
    ├── fixtures/
    │   ├── .editorconfig
    │   ├── __init__.py
    │   ├── session_data/
    │   │   ├── new/
    │   │   │   ├── cookies_dict.json
    │   │   │   ├── cookies_dict_dev_version.json
    │   │   │   ├── cookies_dict_with_extras.json
    │   │   │   ├── empty_cookies_dict.json
    │   │   │   ├── empty_cookies_list.json
    │   │   │   ├── empty_headers_dict.json
    │   │   │   ├── empty_headers_list.json
    │   │   │   ├── headers_cookies_dict_mixed.json
    │   │   │   ├── headers_dict.json
    │   │   │   ├── headers_dict_extras.json
    │   │   │   └── headers_list.json
    │   │   └── old/
    │   │       ├── cookies_dict.json
    │   │       ├── cookies_dict_dev_version.json
    │   │       ├── cookies_dict_with_extras.json
    │   │       ├── empty_cookies_dict.json
    │   │       ├── empty_cookies_list.json
    │   │       ├── empty_headers_dict.json
    │   │       ├── empty_headers_list.json
    │   │       ├── headers_cookies_dict_mixed.json
    │   │       ├── headers_dict.json
    │   │       ├── headers_dict_extras.json
    │   │       └── headers_list.json
    │   ├── test.json
    │   ├── test.txt
    │   ├── test_with_dupe_keys.json
    │   └── xmldata/
    │       ├── invalid/
    │       │   ├── cyclic.xml
    │       │   ├── external.xml
    │       │   ├── external_file.xml
    │       │   ├── not-xml.xml
    │       │   ├── quadratic.xml
    │       │   ├── xalan_exec.xsl
    │       │   ├── xalan_write.xsl
    │       │   ├── xmlbomb.xml
    │       │   └── xmlbomb2.xml
    │       ├── valid/
    │       │   ├── custom-header.xml
    │       │   ├── custom-header_formatted.xml
    │       │   ├── dtd_formatted.xml
    │       │   ├── dtd_raw.xml
    │       │   ├── simple-ns_formatted.xml
    │       │   ├── simple-ns_raw.xml
    │       │   ├── simple-single-tag_formatted.xml
    │       │   ├── simple-single-tag_raw.xml
    │       │   ├── simple-standalone-no_formatted.xml
    │       │   ├── simple-standalone-no_raw.xml
    │       │   ├── simple-standalone-yes_formatted.xml
    │       │   ├── simple-standalone-yes_raw.xml
    │       │   ├── simple_formatted.xml
    │       │   └── simple_raw.xml
    │       └── xhtml/
    │           ├── xhtml_formatted.xml
    │           ├── xhtml_formatted_python_less_than_3.8.xml
    │           └── xhtml_raw.xml
    ├── test_auth.py
    ├── test_auth_plugins.py
    ├── test_binary.py
    ├── test_cli.py
    ├── test_cli_ui.py
    ├── test_cli_utils.py
    ├── test_compress.py
    ├── test_config.py
    ├── test_cookie.py
    ├── test_cookie_on_redirects.py
    ├── test_defaults.py
    ├── test_downloads.py
    ├── test_encoding.py
    ├── test_errors.py
    ├── test_exit_status.py
    ├── test_httpie.py
    ├── test_httpie_cli.py
    ├── test_json.py
    ├── test_meta.py
    ├── test_offline.py
    ├── test_output.py
    ├── test_parser_schema.py
    ├── test_plugins_cli.py
    ├── test_redirects.py
    ├── test_regressions.py
    ├── test_sessions.py
    ├── test_ssl.py
    ├── test_stream.py
    ├── test_tokens.py
    ├── test_transport_plugin.py
    ├── test_update_warnings.py
    ├── test_uploads.py
    ├── test_windows.py
    ├── test_xml.py
    └── utils/
        ├── __init__.py
        ├── http_server.py
        ├── matching/
        │   ├── __init__.py
        │   ├── parsing.py
        │   ├── test_matching.py
        │   └── tokens.py
        └── plugins_cli.py

================================================
FILE CONTENTS
================================================

================================================
FILE: .editorconfig
================================================
# https://editorconfig.org
root = true

[*]
indent_style = space
indent_size = 4
end_of_line = lf
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true

[*.yml]
indent_size = 2

[Makefile]
indent_style = tab
indent_size = 8


================================================
FILE: .github/ISSUE_TEMPLATE/bug_report.md
================================================
---
name: Bug report
about: Report a possible bug in HTTPie
title: ''
labels: "new, bug"
assignees: ''

---

## Checklist

- [ ] I've searched for similar issues.
- [ ] I'm using the latest version of HTTPie.

---

## Minimal reproduction code and steps

1.
2.
3.

## Current result

…

## Expected result

…

---

## Debug output

Please re-run the command with `--debug`, then copy the entire command & output and paste both below:

```bash
$ http --debug <COMPLETE ARGUMENT LIST THAT TRIGGERS THE ERROR>
<COMPLETE OUTPUT>
```

## Additional information, screenshots, or code examples

…


================================================
FILE: .github/ISSUE_TEMPLATE/feature_request.md
================================================
---
name: Feature request
about: Suggest an enhancement for HTTPie
title: ''
labels: "new, enhancement"
assignees: ''

---

## Checklist

- [ ] I've searched for similar feature requests.

---

## Enhancement request

…

---

## Problem it solves

E.g. “I'm always frustrated when […]”, “I’m trying to do […] so that […]”.

---

## Additional information, screenshots, or code examples

…


================================================
FILE: .github/ISSUE_TEMPLATE/other.md
================================================
---
name: Other
about: Anything else that isn't a feature or a bug
title: ''
labels: "new"
assignees: ''

---

If you have a general question, please consider asking on Discord: https://httpie.io/chat


================================================
FILE: .github/dependabot.yml
================================================
version: 2
updates:
  # GitHub Actions
  - package-ecosystem: github-actions
    directory: /
    schedule:
      interval: daily
    assignees:
      - BoboTiG


================================================
FILE: .github/workflows/benchmark.yml
================================================
name: Benchmark

on:
  pull_request:
    types: [ labeled ]

permissions:
  issues: write
  pull-requests: write

jobs:
  test:
    if: github.event.label.name == 'benchmark'
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v3
      - uses: actions/setup-python@v4
        with:
          python-version: "3.9"

      - id: benchmarks
        name: Run Benchmarks
        run: |
          python -m pip install pyperf>=2.3.0
          python extras/profiling/run.py --fresh --complex  --min-speed=6 --file output.txt
          body=$(cat output.txt)
          body="${body//'%'/'%25'}"
          body="${body//$'\n'/'%0A'}"
          body="${body//$'\r'/'%0D'}"
          echo "::set-output name=body::$body"

      - name: Find Comment
        uses: peter-evans/find-comment@v2
        id: fc
        with:
          issue-number: ${{ github.event.pull_request.number }}
          comment-author: 'github-actions[bot]'
          body-includes: '# Benchmarks'

      - name: Create or update comment
        uses: peter-evans/create-or-update-comment@v2
        with:
          comment-id: ${{ steps.fc.outputs.comment-id }}
          issue-number: ${{ github.event.pull_request.number }}
          body: |
            # Benchmarks
            ${{ steps.benchmarks.outputs.body }}
          edit-mode: replace

      - uses: actions-ecosystem/action-remove-labels@v1
        with:
          labels: benchmark


================================================
FILE: .github/workflows/code-style.yml
================================================
name: Code Style Check

on:
  pull_request:
    paths:
      - .github/workflows/code-style.yml
      - extras/*.py
      - httpie/**/*.py
      - setup.py
      - tests/**/*.py

jobs:
  code-style:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v3
      - uses: actions/setup-python@v4
        with:
          python-version: 3.9
      - run: make venv
      - run: make codestyle


================================================
FILE: .github/workflows/content.yml
================================================
name: Update Generated Content
on:
  push:
    branches:
      - master
jobs:
  update-content:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v3
      - uses: actions/setup-python@v4
        with:
          python-version: 3.9
      - run: make content
      - name: Create Pull Request
        id: cpr
        uses: peter-evans/create-pull-request@v4
        with:
          commit-message: "[automated] Update generated content"
          title: "[automated] Update generated content"
          delete-branch: true
          token: ${{ secrets.GITHUB_TOKEN }}


================================================
FILE: .github/workflows/coverage.yml
================================================
name: Coverage

on:
  pull_request:
    paths:
      - .github/workflows/coverage.yml
      - httpie/**/*.py
      - setup.*
      - tests/**/*.py

jobs:
  coverage:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v3
      - uses: actions/setup-python@v4
        with:
          python-version: "3.10"
      - run: make install
      - run: make test-cover
      - run: make codecov-upload
        env:
          CODECOV_TOKEN: ${{ secrets.CODECOV_REPO_TOKEN }}
      - run: make test-dist


================================================
FILE: .github/workflows/docs-check-markdown.yml
================================================
name: Check Markdown Style

on:
  pull_request:
    paths:
      - "*.md"
      - "**/*.md"

jobs:
  doc:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v3
      - name: Setup Ruby
        uses: ruby/setup-ruby@v1
        with:
          ruby-version: 2.7
      - name: Install the linter
        run: sudo gem install mdl
      - name: Check files
        run: make doc-check


================================================
FILE: .github/workflows/docs-deploy.yml
================================================
name: Deploy Documentation

on:
  push:
    branches:
      - master
    paths:
      - docs/README.md
      - docs/config.json
  release:
    types:
      - published
      - unpublished
      - deleted
jobs:
  trigger-doc-build:
    runs-on: ubuntu-latest
    steps:
      - name: Install HTTPie
        run: sudo pip install httpie
      - name: Trigger new documentation build
        run: http --ignore-stdin POST ${{ secrets.DOCS_UPDATE_VERCEL_HOOK }}


================================================
FILE: .github/workflows/release-brew.yml
================================================
name: Release on Homebrew

on:
  workflow_dispatch:
    inputs:
      branch:
        description: "The branch, tag or SHA to release from"
        required: true
        default: "master"

jobs:
  brew-release:
    name: Release the Homebrew Package
    runs-on: macos-latest

    steps:
      - uses: actions/checkout@v3
        with:
          ref: ${{ github.event.inputs.branch }}

      - uses: mislav/bump-homebrew-formula-action@v2
        with:
          formula-name: httpie
          tag-name: ${{ github.events.inputs.branch }}
        env:
          COMMITTER_TOKEN: ${{ secrets.BREW_UPDATE_TOKEN }}


================================================
FILE: .github/workflows/release-choco.yml
================================================
name: Release on Chocolatey

on:
  workflow_dispatch:
    inputs:
      branch:
        description: "The branch, tag or SHA to release from"
        required: true
        default: "master"

jobs:
  brew-release:
    name: Release the Chocolatey
    runs-on: windows-2019
    env:
        package-dir: docs\packaging\windows-chocolatey

    steps:
      - uses: actions/checkout@v3
        with:
          ref: ${{ github.event.inputs.branch }}

      # Chocolatey comes already installed on the Windows GHA image
      - name: Build the Choco package
        shell: cmd
        run: choco pack -v
        working-directory: ${{ env.package-dir }}

      - name: Check the Choco package
        run: choco info httpie -s .
        working-directory: ${{ env.package-dir }}

      - name: Local installation
        run: |
          choco install httpie -y -dv -s "'.;https://community.chocolatey.org/api/v2/'"
        working-directory: ${{ env.package-dir }}

      - name: Test the locally installed binaries
        run: |
          # Source: https://stackoverflow.com/a/46760714/15330941

          # Make `refreshenv` available right away, by defining the $env:ChocolateyInstall
          # variable and importing the Chocolatey profile module.
          $env:ChocolateyInstall = Convert-Path "$((Get-Command choco).Path)\..\.."
          Import-Module "$env:ChocolateyInstall\helpers\chocolateyProfile.psm1"
          refreshenv

          http --version
          https --version
          httpie --version
          choco uninstall -y httpie
        working-directory: ${{ env.package-dir }}

      - name: Publish on Chocolatey
        shell: bash
        env:
          CHOCO_API_KEY: ${{ secrets.CHOCO_API_KEY }}
        run: |
          choco apikey --key $CHOCO_API_KEY --source https://push.chocolatey.org/
          choco push httpie*.nupkg --source https://push.chocolatey.org/
        working-directory: ${{ env.package-dir }}


================================================
FILE: .github/workflows/release-linux-standalone.yml
================================================
name: Release as Standalone Linux Package

on:
  workflow_dispatch:
    inputs:
      branch:
        description: "The branch, tag or SHA to release from"
        required: true
        default: "master"
      tag_name:
        description: "Which release to upload the artifacts to (e.g., 3.0)"
        required: true

  release:
    types: [released, prereleased]


jobs:
  binary-build-and-release:
    name: Build and Release
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v3
        with:
          ref: ${{ github.event.inputs.branch }}

      - uses: actions/setup-python@v4
        with:
          python-version: 3.9

      - name: Build Artifacts
        run: |
          cd extras/packaging/linux
          ./get_release_artifacts.sh

      - uses: actions/upload-artifact@v3
        with:
          name: http
          path: extras/packaging/linux/artifacts/dist/http

      - uses: actions/upload-artifact@v3
        with:
          name: httpie.deb
          path: extras/packaging/linux/artifacts/dist/*.deb

      - uses: actions/upload-artifact@v3
        with:
          name: httpie.rpm
          path: extras/packaging/linux/artifacts/dist/*.rpm

      - name: Determine the release upload upload_url
        id: release_id
        run: |
          pip install httpie
          export API_URL="api.github.com/repos/httpie/cli/releases/tags/${{ github.event.inputs.tag_name }}"
          export UPLOAD_URL=`https --ignore-stdin GET $API_URL | jq -r ".upload_url"`
          echo "::set-output name=UPLOAD_URL::$UPLOAD_URL"

      - name: Publish Debian Package
        uses: actions/upload-release-asset@v1.0.2
        env:
          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
        with:
          upload_url: ${{ steps.release_id.outputs.UPLOAD_URL }}
          asset_path: extras/packaging/linux/artifacts/dist/httpie_${{ github.event.inputs.tag_name }}_amd64.deb
          asset_name: httpie-${{ github.event.inputs.tag_name }}.deb
          asset_content_type: binary/octet-stream

      - name: Publish Single Executable
        uses: actions/upload-release-asset@v1.0.2
        env:
          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
        with:
          upload_url: ${{ steps.release_id.outputs.UPLOAD_URL }}
          asset_path: extras/packaging/linux/artifacts/dist/http
          asset_name: http
          asset_content_type: binary/octet-stream


================================================
FILE: .github/workflows/release-pypi.yml
================================================
name: Release on PyPI

on:
  workflow_dispatch:
    inputs:
      branch:
        description: "The branch, tag or SHA to release from"
        required: true
        default: "master"

jobs:
  pypi-build-and-release:
    name: Build and Release
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v3
        with:
          ref: ${{ github.event.inputs.branch }}

      - uses: actions/setup-python@v4
        with:
          python-version: 3.9

      - name: Build a binary wheel and a source tarball
        run: make install && make build

      - name: Release on PyPI
        uses: pypa/gh-action-pypi-publish@master
        with:
          password: ${{ secrets.PYPI_TOKEN }}


================================================
FILE: .github/workflows/release-snap.yml
================================================
name: Release on Snap

on:
  workflow_dispatch:
    inputs:
      branch:
        description: "The branch, tag or SHA to release from"
        required: true
        default: "master"

jobs:
  snap-build-and-release:
    name: Build & Release the Snap Package
    runs-on: ubuntu-latest

    strategy:
      # If any of the stages fail, then we'll stop the action
      # to give release manager time to investigate the underlying
      # issue.
      fail-fast: true
      matrix:
        level: [edge, beta, candidate, stable]

    # Set the concurrency level for this version, so
    # that we'll release one by one.
    concurrency: ${{ github.event.inputs.branch }}

    steps:
      - uses: actions/checkout@v3
        with:
          ref: ${{ github.event.inputs.branch }}

      - uses: snapcore/action-build@v1
        id: build

      - uses: snapcore/action-publish@v1
        env:
          SNAPCRAFT_STORE_CREDENTIALS: ${{ secrets.SNAP_STORE_LOGIN }}
        with:
          snap: ${{ steps.build.outputs.snap }}
          release: ${{ matrix.level }}


================================================
FILE: .github/workflows/stale.yml
================================================
name: Mark stale pull requests

on: workflow_dispatch

permissions:
  pull-requests: write

jobs:
  stale:
    runs-on: ubuntu-latest

    steps:
    - uses: actions/stale@v8
      with:
        close-pr-message: 'Thanks for the pull request, but since it was stale for more than a 30 days we are closing it. If you want to work back on it, feel free to re-open it or create a new one.'
        stale-pr-label: 'stale'

        days-before-stale: -1
        days-before-issue-stale: -1
        days-before-pr-stale: 30

        days-before-close: -1
        days-before-issue-close: -1
        days-before-pr-close: 0
        
        operations-per-run: 300


================================================
FILE: .github/workflows/test-package-linux-snap.yml
================================================
name: Test Snap Package (Linux)


on:
  pull_request:
    paths:
      - .github/workflows/test-package-linux-snap.yml
      - snapcraft.yaml
  workflow_dispatch:

jobs:
  snap:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v3
      - name: Build
        uses: snapcore/action-build@v1
        id: snapcraft
      - name: Install
        run: sudo snap install --dangerous ${{ steps.snapcraft.outputs.snap }}
      - name: Test
        run: |
          httpie.http --version
          httpie.https --version
          httpie --version
          # Auto-aliases cannot be tested when installing a snap outside the store.
          # http --version
          # https --version


================================================
FILE: .github/workflows/test-package-mac-brew.yml
================================================
name: Test Brew Package (MacOS)

on:
  pull_request:
    paths:
      - .github/workflows/test-package-mac-brew.yml
      - docs/packaging/brew/httpie.rb
  workflow_dispatch:

jobs:
  brew:
    runs-on: macos-latest
    steps:
      - uses: actions/checkout@v3
      - name: Setup brew
        run: |
          brew developer on
          brew update
      - name: Build and test the formula
        run: make brew-test


================================================
FILE: .github/workflows/tests.yml
================================================
name: Tests
concurrency:
  group: ${{ github.head_ref || github.run_id }}
  cancel-in-progress: true

on:
  push:
    branches:
      - master
    paths:
      - .github/workflows/tests.yml
      - httpie/**/*.py
      - setup.*
      - tests/**/*.py
  pull_request:
    paths:
      - .github/workflows/tests.yml
      - httpie/**/*.py
      - setup.*
      - tests/**/*.py

jobs:
  test:
    strategy:
      fail-fast: false
      matrix:
        os: [ubuntu-latest, macos-13, windows-latest]
        python-version:
          - '3.12'
          - '3.11'
          - '3.10'
          - '3.9'
          - '3.8'
          - '3.7'
        pyopenssl: [0, 1]
    runs-on: ${{ matrix.os }}
    steps:
      - uses: actions/checkout@v4
      - uses: actions/setup-python@v4
        with:
          python-version: ${{ matrix.python-version }}
      - name: Windows setup
        if: matrix.os == 'windows-latest'
        run: |
          python -m pip install --upgrade pip wheel
          python -m pip install --upgrade '.[dev]'
          python -m pytest --verbose ./httpie ./tests
        env:
          HTTPIE_TEST_WITH_PYOPENSSL: ${{ matrix.pyopenssl }}
      - name: Linux & Mac setup
        if: matrix.os != 'windows-latest'
        run: |
          make install
          make test
        env:
          HTTPIE_TEST_WITH_PYOPENSSL: ${{ matrix.pyopenssl }}


================================================
FILE: .gitignore
================================================
.DS_Store
.idea/
*.egg-info
.cache/
*.pyc
htmlcov


##############################################################################
# The below is GitHub template for Python project. gitignore.
# <https://github.com/github/gitignore/blob/master/Python.gitignore>
##############################################################################

# Byte-compiled / optimized / DLL files
__pycache__/
*.py[cod]
*$py.class

# C extensions
*.so

# Distribution / packaging
.Python
build/
develop-eggs/
dist/
downloads/
eggs/
.eggs/
lib/
lib64/
parts/
sdist/
var/
wheels/
pip-wheel-metadata/
share/python-wheels/
*.egg-info/
.installed.cfg
*.egg
MANIFEST

# PyInstaller
#  Usually these files are written by a python script from a template
#  before PyInstaller builds the exe, so as to inject date/other infos into it.
*.spec
*.manifest

# Installer logs
pip-log.txt
pip-delete-this-directory.txt

# Unit test / coverage reports
htmlcov/
.nox/
.coverage
.coverage.*
.cache
nosetests.xml
coverage.xml
*.cover
*.py,cover
.hypothesis/
.pytest_cache/

# Translations
*.mo
*.pot

# Django stuff:
*.log
local_settings.py
db.sqlite3
db.sqlite3-journal

# Flask stuff:
instance/
.webassets-cache

# Scrapy stuff:
.scrapy

# Sphinx documentation
docs/_build/

# PyBuilder
target/

# Jupyter Notebook
.ipynb_checkpoints

# IPython
profile_default/
ipython_config.py

# pyenv
.python-version

# pipenv
#   According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
#   However, in case of collaboration, if having platform-specific dependencies or dependencies
#   having no cross-platform support, pipenv may install dependencies that don't work, or not
#   install all needed dependencies.
#Pipfile.lock

# PEP 582; used by e.g. github.com/David-OConnor/pyflow
__pypackages__/

# Celery stuff
celerybeat-schedule
celerybeat.pid

# SageMath parsed files
*.sage.py

# Environments
.env
.venv
env/
venv/
venv*/
ENV/
env.bak/
venv.bak/

# Spyder project settings
.spyderproject
.spyproject

# Rope project settings
.ropeproject

# mkdocs documentation
/site

# mypy
.mypy_cache/
.dmypy.json
dmypy.json

# Pyre type checker
.pyre/

# Packit
/httpie.spec
/httpie-*.rpm
/httpie-*.tar.gz

# VS Code
.vscode/

# Windows Chocolatey
*.nupkg

artifacts/


================================================
FILE: .packit.yaml
================================================
# See the documentation for more information:
# https://packit.dev/docs/configuration/
specfile_path: httpie.spec
actions:
  # get the current Fedora Rawhide specfile:
  post-upstream-clone: "wget https://src.fedoraproject.org/rpms/httpie/raw/rawhide/f/httpie.spec -O httpie.spec"
  # Use this when the latest spec is not up-to-date.
  # post-upstream-clone: "cp docs/packaging/linux-fedora/httpie.spec.txt httpie.spec"
jobs:
- job: propose_downstream
  trigger: release
  metadata:
    dist_git_branches:
    - rawhide


================================================
FILE: AUTHORS.md
================================================
# HTTPie authors

- [Jakub Roztocil](https://github.com/jakubroztocil)

## Patches, features, ideas

[Complete list of contributors on GitHub](https://github.com/httpie/cli/graphs/contributors)

- [Cláudia T. Delgado](https://github.com/claudiatd)
- [Hank Gay](https://github.com/gthank)
- [Jake Basile](https://github.com/jakebasile)
- [Vladimir Berkutov](https://github.com/dair-targ)
- [Jakob Kramer](https://github.com/gandaro)
- [Chris Faulkner](https://github.com/faulkner)
- [Alen Mujezinovic](https://github.com/flashingpumpkin)
- [Praful Mathur](https://github.com/tictactix)
- [Marc Abramowitz](https://github.com/msabramo)
- [Ismail Badawi](https://github.com/isbadawi)
- [Laurent Bachelier](https://github.com/laurentb)
- [Isman Firmansyah](https://github.com/iromli)
- [Simon Olofsson](https://github.com/simono)
- [Churkin Oleg](https://github.com/Bahus)
- [Jökull Sólberg Auðunsson](https://github.com/jokull)
- [Matthew M. Boedicker](https://github.com/mmb)
- [marblar](https://github.com/marblar)
- [Tomek Wójcik](https://github.com/tomekwojcik)
- [Davey Shafik](https://github.com/dshafik)
- [cido](https://github.com/cido)
- [Justin Bonnar](https://github.com/jargonjustin)
- [Nathan LaFreniere](https://github.com/nlf)
- [Matthias Lehmann](https://github.com/matleh)
- [Dennis Brakhane](https://github.com/brakhane)
- [Matt Layman](https://github.com/mblayman)
- [Edward Yang](https://github.com/honorabrutroll)
- [Aleksandr Vinokurov](https://github.com/aleksandr-vin)
- [Jeff Byrnes](https://github.com/jeffbyrnes)
- [Denis Belavin](https://github.com/LuckyDenis)
- [Mickaël Schoentgen](https://github.com/BoboTiG)
- [Elena Lape](https://github.com/elenalape)
- [Rohit Sehgal](https://github.com/r0hi7)
- [Bartłomiej Jacak](https://github.com/bartekjacak)


================================================
FILE: CHANGELOG.md
================================================
# Change Log

This document records all notable changes to [HTTPie](https://httpie.io).
This project adheres to [Semantic Versioning](https://semver.org/).

## [3.2.4](https://github.com/httpie/cli/compare/3.2.3...3.2.4) (2024-11-01)

- Fix default certs loading and unpin `requests`. ([#1596](https://github.com/httpie/cli/issues/1596))

## [3.2.3](https://github.com/httpie/cli/compare/3.2.2...3.2.3) (2024-07-10)

- Fix SSL connections by pinning the `requests` version to `2.31.0`. (#1583, #1581)
- Make it possible to [unset](https://httpie.io/docs/cli/default-request-headers) the `User-Agent` and `Accept-Encoding` request headers. ([#1502](https://github.com/httpie/cli/issues/1502))

## [3.2.2](https://github.com/httpie/cli/compare/3.2.1...3.2.2) (2023-05-19)

- Fixed compatibility with urllib3 2.0.0. ([#1499](https://github.com/httpie/cli/issues/1499))

## [3.2.1](https://github.com/httpie/cli/compare/3.1.0...3.2.1) (2022-05-06)

- Improved support for determining auto-streaming when the `Content-Type` header includes encoding information. ([#1383](https://github.com/httpie/cli/pull/1383))
- Fixed the display of the crash happening in the secondary process for update checks. ([#1388](https://github.com/httpie/cli/issues/1388))

## [3.2.0](https://github.com/httpie/cli/compare/3.1.0...3.2.0) (2022-05-05)

- Added a warning for notifying the user about the new updates. ([#1336](https://github.com/httpie/cli/pull/1336))
- Added support for single binary executables. ([#1330](https://github.com/httpie/cli/pull/1330))
- Added support for man pages (and auto generation of them from the parser declaration). ([#1317](https://github.com/httpie/cli/pull/1317))
- Added `http --manual` for man pages & regular manual with pager. ([#1343](https://github.com/httpie/cli/pull/1343))
- Added support for session persistence of repeated headers with the same name. ([#1335](https://github.com/httpie/cli/pull/1335))
- Added support for sending `Secure` cookies to the `localhost` (and `.local` suffixed domains). ([#1308](https://github.com/httpie/cli/issues/1308))
- Improved UI for the progress bars. ([#1324](https://github.com/httpie/cli/pull/1324))
- Fixed redundant creation of `Content-Length` header on `OPTIONS` requests. ([#1310](https://github.com/httpie/cli/issues/1310))
- Fixed blocking of warning thread on some use cases. ([#1349](https://github.com/httpie/cli/issues/1349))
- Changed `httpie plugins` to the new `httpie cli` namespace as `httpie cli plugins` (`httpie plugins` continues to work as a hidden alias). ([#1320](https://github.com/httpie/cli/issues/1320))
- Soft deprecated the `--history-print`. ([#1380](https://github.com/httpie/cli/pull/1380))

## [3.1.0](https://github.com/httpie/cli/compare/3.0.2...3.1.0) (2022-03-08)

- **SECURITY** Fixed the [vulnerability](https://github.com/httpie/cli/security/advisories/GHSA-9w4w-cpc8-h2fq) that caused exposure of cookies on redirects to third party hosts. ([#1312](https://github.com/httpie/cli/pull/1312))
- Fixed escaping of integer indexes with multiple backslashes in the nested JSON builder. ([#1285](https://github.com/httpie/cli/issues/1285))
- Fixed displaying of status code without a status message on non-`auto` themes. ([#1300](https://github.com/httpie/cli/issues/1300))
- Fixed redundant issuance of stdin detection warnings on some rare cases due to underlying implementation. ([#1303](https://github.com/httpie/cli/pull/1303))
- Fixed double `--quiet` so that it will now suppress all python level warnings. ([#1271](https://github.com/httpie/cli/issues/1271))
- Added support for specifying certificate private key passphrases through `--cert-key-pass` and prompts. ([#946](https://github.com/httpie/cli/issues/946))
- Added `httpie cli export-args` command for exposing the parser specification for the `http`/`https` commands. ([#1293](https://github.com/httpie/cli/pull/1293))
- Improved regulation of top-level arrays. ([#1292](https://github.com/httpie/cli/commit/225dccb2186f14f871695b6c4e0bfbcdb2e3aa28))
- Improved UI layout for standalone invocations. ([#1296](https://github.com/httpie/cli/pull/1296))

## [3.0.2](https://github.com/httpie/cli/compare/3.0.1...3.0.2) (2022-01-24)

[What’s new in HTTPie for Terminal 3.0 →](https://httpie.io/blog/httpie-3.0.0)

- Fixed usage of `httpie` when there is a presence of a config with `default_options`. ([#1280](https://github.com/httpie/cli/pull/1280))

## [3.0.1](https://github.com/httpie/cli/compare/3.0.0...3.0.1) (2022-01-23)

[What’s new in HTTPie for Terminal 3.0 →](https://httpie.io/blog/httpie-3.0.0)

- Changed the value shown as time elapsed from time-to-read-headers to total exchange time. ([#1277](https://github.com/httpie/cli/issues/1277))

## [3.0.0](https://github.com/httpie/cli/compare/2.6.0...3.0.0) (2022-01-21)

[What’s new in HTTPie for Terminal 3.0 →](https://httpie.io/blog/httpie-3.0.0)

- Dropped support for Python 3.6. ([#1177](https://github.com/httpie/cli/issues/1177))
- Improved startup time by 40%. ([#1211](https://github.com/httpie/cli/pull/1211))
- Added support for nested JSON syntax. ([#1169](https://github.com/httpie/cli/issues/1169))
- Added `httpie plugins` interface for plugin management. ([#566](https://github.com/httpie/cli/issues/566))
- Added support for Bearer authentication via `--auth-type=bearer` ([#1215](https://github.com/httpie/cli/issues/1215)).
- Added support for quick conversions of pasted URLs into HTTPie calls by adding a space after the protocol name (`$ https ://pie.dev` → `https://pie.dev`). ([#1195](https://github.com/httpie/cli/issues/1195))
- Added support for _sending_ multiple HTTP header lines with the same name. ([#130](https://github.com/httpie/cli/issues/130))
- Added support for _receiving_ multiple HTTP headers lines with the same name. ([#1207](https://github.com/httpie/cli/issues/1207))
- Added support for basic JSON types on `--form`/`--multipart` when using JSON only operators (`:=`/`:=@`). ([#1212](https://github.com/httpie/cli/issues/1212))
- Added support for automatically enabling `--stream` when `Content-Type` is `text/event-stream`. ([#376](https://github.com/httpie/cli/issues/376))
- Added support for displaying the total elapsed time through `--meta`/`-vv` or `--print=m`. ([#243](https://github.com/httpie/cli/issues/243))
- Added new `pie-dark`/`pie-light` (and `pie`) styles that match with [HTTPie for Web and Desktop](https://httpie.io/product). ([#1237](https://github.com/httpie/cli/issues/1237))
- Added support for better error handling on DNS failures. ([#1248](https://github.com/httpie/cli/issues/1248))
- Added support for storing prompted passwords in the local sessions. ([#1098](https://github.com/httpie/cli/issues/1098))
- Added warnings about the `--ignore-stdin`, when there is no incoming data from stdin. ([#1255](https://github.com/httpie/cli/issues/1255))
- Fixed crashing due to broken plugins. ([#1204](https://github.com/httpie/cli/issues/1204))
- Fixed auto addition of XML declaration to every formatted XML response. ([#1156](https://github.com/httpie/cli/issues/1156))
- Fixed highlighting when `Content-Type` specifies `charset`. ([#1242](https://github.com/httpie/cli/issues/1242))
- Fixed an unexpected crash when `--raw` is used with `--chunked`. ([#1253](https://github.com/httpie/cli/issues/1253))
- Changed the default Windows theme from `fruity` to `auto`. ([#1266](https://github.com/httpie/cli/issues/1266))

## [2.6.0](https://github.com/httpie/cli/compare/2.5.0...2.6.0) (2021-10-14)

[What’s new in HTTPie for Terminal 2.6.0 →](https://httpie.io/blog/httpie-2.6.0)

- Added support for formatting & coloring of JSON bodies preceded by non-JSON data (e.g., an XXSI prefix). ([#1130](https://github.com/httpie/cli/issues/1130))
- Added charset auto-detection when `Content-Type` doesn’t include it. ([#1110](https://github.com/httpie/cli/issues/1110), [#1168](https://github.com/httpie/cli/issues/1168))
- Added `--response-charset` to allow overriding the response encoding for terminal display purposes. ([#1168](https://github.com/httpie/cli/issues/1168))
- Added `--response-mime` to allow overriding the response mime type for coloring and formatting for the terminal. ([#1168](https://github.com/httpie/cli/issues/1168))
- Added the ability to silence warnings through using `-q` or `--quiet` twice (e.g. `-qq`) ([#1175](https://github.com/httpie/cli/issues/1175))
- Added installed plugin list to `--debug` output. ([#1165](https://github.com/httpie/cli/issues/1165))
- Fixed duplicate keys preservation in JSON data. ([#1163](https://github.com/httpie/cli/issues/1163))

## [2.5.0](https://github.com/httpie/cli/compare/2.4.0...2.5.0) (2021-09-06)

[What’s new in HTTPie for Terminal 2.5.0 →](https://httpie.io/blog/httpie-2.5.0)

- Added `--raw` to allow specifying the raw request body without extra processing as
  an alternative to `stdin`. ([#534](https://github.com/httpie/cli/issues/534))
- Added support for XML formatting. ([#1129](https://github.com/httpie/cli/issues/1129))
- Added internal support for file-like object responses to improve adapter plugin support. ([#1094](https://github.com/httpie/cli/issues/1094))
- Fixed `--continue --download` with a single byte to be downloaded left. ([#1032](https://github.com/httpie/cli/issues/1032))
- Fixed `--verbose` HTTP 307 redirects with streamed request body. ([#1088](https://github.com/httpie/cli/issues/1088))
- Fixed handling of session files with `Cookie:` followed by other headers. ([#1126](https://github.com/httpie/cli/issues/1126))

## [2.4.0](https://github.com/httpie/cli/compare/2.3.0...2.4.0) (2021-02-06)

- Added support for `--session` cookie expiration based on `Set-Cookie: max-age=<n>`. ([#1029](https://github.com/httpie/cli/issues/1029))
- Show a `--check-status` warning with `--quiet` as well, not only when the output is redirected. ([#1026](https://github.com/httpie/cli/issues/1026))
- Fixed upload with `--session` ([#1020](https://github.com/httpie/cli/issues/1020)).
- Fixed a missing blank line between request and response ([#1006](https://github.com/httpie/cli/issues/1006)).

## [2.3.0](https://github.com/httpie/cli/compare/2.2.0...2.3.0) (2020-10-25)

- Added support for streamed uploads ([#201](https://github.com/httpie/cli/issues/201)).
- Added support for multipart upload streaming ([#684](https://github.com/httpie/cli/issues/684)).
- Added support for body-from-file upload streaming (`http pie.dev/post @file`).
- Added `--chunked` to enable chunked transfer encoding ([#753](https://github.com/httpie/cli/issues/753)).
- Added `--multipart` to allow `multipart/form-data` encoding for non-file `--form` requests as well.
- Added support for preserving field order in multipart requests ([#903](https://github.com/httpie/cli/issues/903)).
- Added `--boundary` to allow a custom boundary string for `multipart/form-data` requests.
- Added support for combining cookies specified on the CLI and in a session file ([#932](https://github.com/httpie/cli/issues/932)).
- Added out of the box SOCKS support with no extra installation ([#904](https://github.com/httpie/cli/issues/904)).
- Added `--quiet, -q` flag to enforce silent behaviour.
- Fixed the handling of invalid `expires` dates in `Set-Cookie` headers ([#963](https://github.com/httpie/cli/issues/963)).
- Removed Tox testing entirely ([#943](https://github.com/httpie/cli/issues/943)).

## [2.2.0](https://github.com/httpie/cli/compare/2.1.0...2.2.0) (2020-06-18)

- Added support for custom content types for uploaded files ([#668](https://github.com/httpie/cli/issues/668)).
- Added support for `$XDG_CONFIG_HOME` ([#920](https://github.com/httpie/cli/issues/920)).
- Added support for `Set-Cookie`-triggered cookie expiration ([#853](https://github.com/httpie/cli/issues/853)).
- Added `--format-options` to allow disabling sorting, etc. ([#128](https://github.com/httpie/cli/issues/128))
- Added `--sorted` and `--unsorted` shortcuts for (un)setting all sorting-related `--format-options`. ([#128](https://github.com/httpie/cli/issues/128))
- Added `--ciphers` to allow configuring OpenSSL ciphers ([#870](https://github.com/httpie/cli/issues/870)).
- Added `netrc` support for auth plugins. Enabled for `--auth-type=basic`
  and `digest`, 3rd parties may opt in ([#718](https://github.com/httpie/cli/issues/718), [#719](https://github.com/httpie/cli/issues/719), [#852](https://github.com/httpie/cli/issues/852), [#934](https://github.com/httpie/cli/issues/934)).
- Fixed built-in plugins-related circular imports ([#925](https://github.com/httpie/cli/issues/925)).

## [2.1.0](https://github.com/httpie/cli/compare/2.0.0...2.1.0) (2020-04-18)

- Added `--path-as-is` to bypass dot segment (`/../` or `/./`)
  URL squashing ([#895](https://github.com/httpie/cli/issues/895)).
- Changed the default `Accept` header value for JSON requests from
  `application/json, */*` to `application/json, */*;q=0.5`
  to clearly indicate preference ([#488](https://github.com/httpie/cli/issues/488)).
- Fixed `--form` file upload mixed with redirected `stdin` error handling
  ([#840](https://github.com/httpie/cli/issues/840)).

## [2.0.0](https://github.com/httpie/cli/compare/1.0.3...2.0.0) (2020-01-12)

- Removed Python 2.7 support ([EOL Jan 2020](https://www.python.org/doc/sunset-python-2/).
- Added `--offline` to allow building an HTTP request and printing it but not
  actually sending it over the network.
- Replaced the old collect-all-then-process handling of HTTP communication
  with one-by-one processing of each HTTP request or response as they become
  available. This means that you can see headers immediately,
  see what is being sent even if the request fails, etc.
- Removed automatic config file creation to avoid concurrency issues.
- Removed the default 30-second connection `--timeout` limit.
- Removed Python’s default limit of 100 response headers.
- Added `--max-headers` to allow setting the max header limit.
- Added `--compress` to allow request body compression.
- Added `--ignore-netrc` to allow bypassing credentials from `.netrc`.
- Added `https` alias command with `https://` as the default scheme.
- Added `$ALL_PROXY` documentation.
- Added type annotations throughout the codebase.
- Added `tests/` to the PyPi package for the convenience of
  downstream package maintainers.
- Fixed an error when `stdin` was a closed fd.
- Improved `--debug` output formatting.

## [1.0.3](https://github.com/httpie/cli/compare/1.0.2...1.0.3) (2019-08-26)

- Fixed CVE-2019-10751 — the way the output filename is generated for
  `--download` requests without `--output` resulting in a redirect has
  been changed to only consider the initial URL as the base for the generated
  filename, and not the final one. This fixes a potential security issue under
  the following scenario:

  1. A `--download` request with no explicit `--output` is made (e.g.,
     `$ http -d example.org/file.txt`), instructing httpie to
     [generate the output filename](https://httpie.org/doc#downloaded-filename)
     from the `Content-Disposition` response header, or from the URL if the header
     is not provided.
  2. The server handling the request has been modified by an attacker and
     instead of the expected response the URL returns a redirect to another
     URL, e.g., `attacker.example.org/.bash_profile`, whose response does
     not provide  a `Content-Disposition` header (i.e., the base for the
     generated filename becomes `.bash_profile` instead of `file.txt`).
  3. Your current directory doesn’t already contain `.bash_profile`
     (i.e., no unique suffix is added to the generated filename).
  4. You don’t notice the potentially unexpected output filename
     as reported by httpie in the console output
     (e.g., `Downloading 100.00 B to ".bash_profile"`).

  Reported by Raul Onitza and Giulio Comi.

## [1.0.2](https://github.com/httpie/cli/compare/1.0.1...1.0.2) (2018-11-14)

- Fixed tests for installation with pyOpenSSL.

## [1.0.1](https://github.com/httpie/cli/compare/1.0.0...1.0.1) (2018-11-14)

- Removed external URL calls from tests.

## [1.0.0](https://github.com/httpie/cli/compare/0.9.9...1.0.0) (2018-11-02)

- Added `--style=auto` which follows the terminal ANSI color styles.
- Added support for selecting TLS 1.3 via `--ssl=tls1.3`
  (available once implemented in upstream libraries).
- Added `true`/`false` as valid values for `--verify`
  (in addition to `yes`/`no`) and the boolean value is case-insensitive.
- Changed the default `--style` from `solarized` to `auto` (on Windows it stays `fruity`).
- Fixed default headers being incorrectly case-sensitive.
- Removed Python 2.6 support.

## [0.9.9](https://github.com/httpie/cli/compare/0.9.8...0.9.9) (2016-12-08)

- Fixed README.

## [0.9.8](https://github.com/httpie/cli/compare/0.9.6...0.9.8) (2016-12-08)

- Extended auth plugin API.
- Added exit status code `7` for plugin errors.
- Added support for `curses`-less Python installations.
- Fixed `REQUEST_ITEM` arg incorrectly being reported as required.
- Improved `CTRL-C` interrupt handling.
- Added the standard exit status code `130` for keyboard interrupts.

## [0.9.6](https://github.com/httpie/cli/compare/0.9.4...0.9.6) (2016-08-13)

- Added Python 3 as a dependency for Homebrew installations
  to ensure some of the newer HTTP features work out of the box
  for macOS users (starting with HTTPie 0.9.4.).
- Added the ability to unset a request header with `Header:`, and send an
  empty value with `Header;`.
- Added `--default-scheme <URL_SCHEME>` to enable things like
  `$ alias https='http --default-scheme=https`.
- Added `-I` as a shortcut for `--ignore-stdin`.
- Added fish shell completion (located in `extras/httpie-completion.fish`
  in the GitHub repo).
- Updated `requests` to 2.10.0 so that SOCKS support can be added via
  `pip install requests[socks]`.
- Changed the default JSON `Accept` header from `application/json`
  to `application/json, */*`.
- Changed the pre-processing of request HTTP headers so that any leading
  and trailing whitespace is removed.

## [0.9.4](https://github.com/httpie/cli/compare/0.9.3...0.9.4) (2016-07-01)

- Added `Content-Type` of files uploaded in `multipart/form-data` requests
- Added `--ssl=<PROTOCOL>` to specify the desired SSL/TLS protocol version
  to use for HTTPS requests.
- Added JSON detection with `--json, -j` to work around incorrect
  `Content-Type`
- Added `--all` to show intermediate responses such as redirects (with `--follow`)
- Added `--history-print, -P WHAT` to specify formatting of intermediate responses
- Added `--max-redirects=N` (default 30)
- Added `-A` as short name for `--auth-type`
- Added `-F` as short name for `--follow`
- Removed the `implicit_content_type` config option
  (use `"default_options": ["--form"]` instead)
- Redirected `stdout` doesn't trigger an error anymore when `--output FILE`
  is set
- Changed the default `--style` back to `solarized` for better support
  of light and dark terminals
- Improved `--debug` output
- Fixed `--session` when used with `--download`
- Fixed `--download` to trim too long filenames before saving the file
- Fixed the handling of `Content-Type` with multiple `+subtype` parts
- Removed the XML formatter as the implementation suffered from multiple issues

## [0.9.3](https://github.com/httpie/cli/compare/0.9.2...0.9.3) (2016-01-01)

- Changed the default color `--style` from `solarized` to `monokai`
- Added basic Bash autocomplete support (need to be installed manually)
- Added request details to connection error messages
- Fixed `'requests.packages.urllib3' has no attribute 'disable_warnings'`
  errors that occurred in some installations
- Fixed colors and formatting on Windows
- Fixed `--auth` prompt on Windows

## [0.9.2](https://github.com/httpie/cli/compare/0.9.1...0.9.2) (2015-02-24)

- Fixed compatibility with Requests 2.5.1
- Changed the default JSON `Content-Type` to `application/json` as UTF-8
  is the default JSON encoding

## [0.9.1](https://github.com/httpie/cli/compare/0.9.0...0.9.1) (2015-02-07)

- Added support for Requests transport adapter plugins
  (see [httpie-unixsocket](https://github.com/httpie/httpie-unixsocket)
  and [httpie-http2](https://github.com/httpie/httpie-http2))

## [0.9.0](https://github.com/httpie/cli/compare/0.8.0...0.9.0) (2015-01-31)

- Added `--cert` and `--cert-key` parameters to specify a client side
  certificate and private key for SSL
- Improved unicode support
- Improved terminal color depth detection via `curses`
- To make it easier to deal with Windows paths in request items, `\`
  now only escapes special characters (the ones that are used as key-value
  separators by HTTPie)
- Switched from `unittest` to `pytest`
- Added Python `wheel` support
- Various test suite improvements
- Added `CONTRIBUTING`
- Fixed `User-Agent` overwriting when used within a session
- Fixed handling of empty passwords in URL credentials
- Fixed multiple file uploads with the same form field name
- Fixed `--output=/dev/null` on Linux
- Miscellaneous bugfixes

## [0.8.0](https://github.com/httpie/cli/compare/0.7.1...0.8.0) (2014-01-25)

- Added `field=@file.txt` and `field:=@file.json` for embedding
  the contents of text and JSON files into request data
- Added curl-style shorthand for localhost
- Fixed request `Host` header value output so that it doesn't contain
  credentials, if included in the URL

## [0.7.1](https://github.com/httpie/cli/compare/0.6.0...0.7.1) (2013-09-24)

- Added `--ignore-stdin`
- Added support for auth plugins
- Improved `--help` output
- Improved `Content-Disposition` parsing for `--download` mode
- Update to Requests 2.0.0

## [0.6.0](https://github.com/httpie/cli/compare/0.5.1...0.6.0) (2013-06-03)

- XML data is now formatted
- `--session` and `--session-read-only` now also accept paths to
  session files (eg. `http --session=/tmp/session.json example.org`)

## [0.5.1](https://github.com/httpie/cli/compare/0.5.0...0.5.1) (2013-05-13)

- `Content-*` and `If-*` request headers are not stored in sessions
  anymore as they are request-specific

## [0.5.0](https://github.com/httpie/cli/compare/0.4.1...0.5.0) (2013-04-27)

- Added a download mode via `--download`
- Fixes miscellaneous bugs

## [0.4.1](https://github.com/httpie/cli/compare/0.4.0...0.4.1) (2013-02-26)

- Fixed `setup.py`

## [0.4.0](https://github.com/httpie/cli/compare/0.3.0...0.4.0) (2013-02-22)

- Added Python 3.3 compatibility
- Added Requests >= v1.0.4 compatibility
- Added support for credentials in URL
- Added `--no-option` for every `--option` to be config-friendly
- Mutually exclusive arguments can be specified multiple times. The
  last value is used

## [0.3.0](https://github.com/httpie/cli/compare/0.2.7...0.3.0) (2012-09-21)

- Allow output redirection on Windows
- Added configuration file
- Added persistent session support
- Renamed `--allow-redirects` to `--follow`
- Improved the usability of `http --help`
- Fixed installation on Windows with Python 3
- Fixed colorized output on Windows with Python 3
- CRLF HTTP header field separation in the output
- Added exit status code `2` for timed-out requests
- Added the option to separate colorizing and formatting
  (`--pretty=all`, `--pretty=colors` and `--pretty=format`)
  `--ugly` has bee removed in favor of `--pretty=none`

## [0.2.7](https://github.com/httpie/cli/compare/0.2.5...0.2.7) (2012-08-07)

- Added compatibility with Requests 0.13.6
- Added streamed terminal output. `--stream, -S` can be used to enable
  streaming also with `--pretty` and to ensure a more frequent output
  flushing
- Added support for efficient large file downloads
- Sort headers by name (unless `--pretty=none`)
- Response body is fetched only when needed (e.g., not with `--headers`)
- Improved content type matching
- Updated Solarized color scheme
- Windows: Added `--output FILE` to store output into a file
  (piping results in corrupted data on Windows)
- Proper handling of binary requests and responses
- Fixed printing of `multipart/form-data` requests
- Renamed `--traceback` to `--debug`

## [0.2.6](https://github.com/httpie/cli/compare/0.2.5...0.2.6) (2012-07-26)

- The short option for `--headers` is now `-h` (`-t` has been
  removed, for usage use `--help`)
- Form data and URL parameters can have multiple fields with the same name
  (e.g.,`http -f url a=1 a=2`)
- Added `--check-status` to exit with an error on HTTP 3xx, 4xx and
  5xx (3, 4, and 5, respectively)
- If the output is piped to another program or redirected to a file,
  the default behaviour is to only print the response body
  (It can still be overwritten via the `--print` flag.)
- Improved highlighting of HTTP headers
- Added query string parameters (`param==value`)
- Added support for terminal colors under Windows

## [0.2.5](https://github.com/httpie/cli/compare/0.2.2...0.2.5) (2012-07-17)

- Unicode characters in prettified JSON now don't get escaped for
  improved readability
- --auth now prompts for a password if only a username provided
- Added support for request payloads from a file path with automatic
  `Content-Type` (`http URL @/path`)
- Fixed missing query string when displaying the request headers via
  `--verbose`
- Fixed Content-Type for requests with no data

## [0.2.2](https://github.com/httpie/cli/compare/0.2.1...0.2.2) (2012-06-24)

- The `METHOD` positional argument can now be omitted (defaults to
  `GET`, or to `POST` with data)
- Fixed --verbose --form
- Added support for Tox

## [0.2.1](https://github.com/httpie/cli/compare/0.2.0...0.2.1) (2012-06-13)

- Added compatibility with `requests-0.12.1`
- Dropped custom JSON and HTTP lexers in favor of the ones newly included
  in `pygments-1.5`

## [0.2.0](https://github.com/httpie/cli/compare/0.1.6...0.2.0) (2012-04-25)

- Added Python 3 support
- Added the ability to print the HTTP request as well as the response
  (see `--print` and `--verbose`)
- Added support for Digest authentication
- Added file upload support
  (`http -f POST file_field_name@/path/to/file`)
- Improved syntax highlighting for JSON
- Added support for field name escaping
- Many bug fixes

## [0.1.6](https://github.com/httpie/cli/compare/0.1.5...0.1.6) (2012-03-04)

- Fixed `setup.py`

## [0.1.5](https://github.com/httpie/cli/compare/0.1.4...0.1.5) (2012-03-04)

- Many improvements and bug fixes

## [0.1.4](https://github.com/httpie/cli/compare/b966efa...0.1.4) (2012-02-28)

- Many improvements and bug fixes

## [0.1.0](https://github.com/httpie/cli/commit/b966efa) (2012-02-25)

- Initial public release


================================================
FILE: CODE_OF_CONDUCT.md
================================================
# Contributor Covenant Code of Conduct

## Our Pledge

In the interest of fostering an open and welcoming environment, we as
contributors and maintainers pledge to making participation in our project and
our community a harassment-free experience for everyone, regardless of age, body
size, disability, ethnicity, sex characteristics, gender identity and expression,
level of experience, education, socio-economic status, nationality, personal
appearance, race, religion, or sexual identity and orientation.

## Our Standards

Examples of behavior that contributes to creating a positive environment
include:

- Using welcoming and inclusive language
- Being respectful of differing viewpoints and experiences
- Gracefully accepting constructive criticism
- Focusing on what is best for the community
- Showing empathy towards other community members

Examples of unacceptable behavior by participants include:

- The use of sexualized language or imagery and unwelcome sexual attention or
  advances
- Trolling, insulting/derogatory comments, and personal or political attacks
- Public or private harassment
- Publishing others' private information, such as a physical or electronic
  address, without explicit permission
- Other conduct which could reasonably be considered inappropriate in a
  professional setting

## Our Responsibilities

Project maintainers are responsible for clarifying the standards of acceptable
behavior and are expected to take appropriate and fair corrective action in
response to any instances of unacceptable behavior.

Project maintainers have the right and responsibility to remove, edit, or
reject comments, commits, code, wiki edits, issues, and other contributions
that are not aligned to this Code of Conduct, or to ban temporarily or
permanently any contributor for other behaviors that they deem inappropriate,
threatening, offensive, or harmful.

## Scope

This Code of Conduct applies both within project spaces and in public spaces
when an individual is representing the project or its community. Examples of
representing a project or community include using an official project e-mail
address, posting via an official social media account, or acting as an appointed
representative at an online or offline event. Representation of a project may be
further defined and clarified by project maintainers.

## Enforcement

Instances of abusive, harassing, or otherwise unacceptable behavior may be
reported by contacting the project team at jakub@roztocil.co. All
complaints will be reviewed and investigated and will result in a response that
is deemed necessary and appropriate to the circumstances. The project team is
obligated to maintain confidentiality with regard to the reporter of an incident.
Further details of specific enforcement policies may be posted separately.

Project maintainers who do not follow or enforce the Code of Conduct in good
faith may face temporary or permanent repercussions as determined by other
members of the project's leadership.

## Attribution

This Code of Conduct is adapted from the [Contributor Covenant](https://www.contributor-covenant.org),
version 1.4, available at <https://www.contributor-covenant.org/version/1/4/code-of-conduct.html>

For answers to common questions about this code of conduct, see
<https://www.contributor-covenant.org/faq>


================================================
FILE: CONTRIBUTING.md
================================================
# Contributing to HTTPie

Bug reports and code and documentation patches are welcome. You can
help this project also by using the development version of HTTPie
and by reporting any bugs you might encounter.

## 1. Reporting bugs

**It's important that you provide the full command argument list
as well as the output of the failing command.**

Use the `--debug` flag and copy&paste both the command and its output
to your bug report, e.g.:

```bash
$ http --debug <COMPLETE ARGUMENT LIST THAT TRIGGERS THE ERROR>
<COMPLETE OUTPUT>
```

## 2. Contributing Code and Docs

Before working on a new feature or a bug, please browse [existing issues](https://github.com/httpie/cli/issues)
to see whether it has previously been discussed.

If your change alters HTTPie’s behaviour or interface, it's a good idea to
discuss it before you start working on it.

If you are fixing an issue, the first step should be to create a test case that
reproduces the incorrect behaviour. That will also help you to build an
understanding of the issue at hand.

**Pull requests introducing code changes without tests
will generally not get merged. The same goes for PRs changing HTTPie’s
behaviour and not providing documentation.**

Conversely, PRs consisting of documentation improvements or tests
for existing-yet-previously-untested behavior will very likely be merged.
Therefore, docs and tests improvements are a great candidate for your first
contribution.

Consider also adding a [CHANGELOG](https://github.com/httpie/cli/blob/master/CHANGELOG.md) entry for your changes.

### Development Environment

#### Getting the code

Go to <https://github.com/httpie/cli> and fork the project repository.

```bash
# Clone your fork
$ git clone git@github.com:<YOU>/httpie.git

# Enter the project directory
$ cd httpie

# Create a branch for your changes
$ git checkout -b my_topical_branch
```

#### Setup

The [Makefile](https://github.com/httpie/cli/blob/master/Makefile) contains a bunch of tasks to get you started.
You can run `$ make` to see all the available tasks.

To get started, run the command below, which:

- Creates an isolated Python virtual environment inside `./venv`
  (via the standard library [venv](https://docs.python.org/3/library/venv.html) tool);
- installs all dependencies and also installs HTTPie
  (in editable mode so that the `http` command will point to your
  working copy).
- and runs tests (It is the same as running `make install test`).

```bash
$ make all
```

#### Python virtual environment

Activate the Python virtual environment—created via the `make install`
task during [setup](#setup) for your active shell session using the following command:

```bash
$ source venv/bin/activate
```

(If you use `virtualenvwrapper`, you can also use `workon httpie` to
activate the environment — we have created a symlink for you. It’s a bit of
a hack but it works™.)

You should now see `(httpie)` next to your shell prompt, and
the `http` command should point to your development copy:

```bash
(httpie) ~/Code/httpie $ which http
/Users/<user>/Code/httpie/venv/bin/http
(httpie) ~/Code/httpie $ http --version
2.0.0-dev
```

(Btw, you don’t need to activate the virtual environment if you just want
run some of the `make` tasks. You can also invoke the development
version of HTTPie directly with `./venv/bin/http` without having to activate
the environment first. The same goes for `./venv/bin/pytest`, etc.).

### Making Changes

Please make sure your changes conform to [Style Guide for Python Code](https://python.org/dev/peps/pep-0008/) (PEP8)
and that `make pycodestyle` passes.

### Testing & CI

Please add tests for any new features and bug fixes.

When you open a Pull Request, [GitHub Actions](https://github.com/httpie/cli/actions) will automatically run HTTPie’s [test suite](https://github.com/httpie/cli/tree/master/tests) against your code, so please make sure all checks pass.

#### Running tests locally

HTTPie uses the [pytest](https://pytest.org/) runner.

```bash
# Run tests on the current Python interpreter with coverage.
$ make test

# Run tests with coverage
$ make test-cover

# Test PEP8 compliance
$ make codestyle

# Run extended tests — for code as well as .md files syntax, packaging, etc.
$ make test-all
```

#### Running specific tests

After you have activated your virtual environment (see [setup](#setup)), you
can run specific tests from the terminal:

```bash
# Run specific tests on the current Python
$ python -m pytest tests/test_uploads.py
$ python -m pytest tests/test_uploads.py::TestMultipartFormDataFileUpload
$ python -m pytest tests/test_uploads.py::TestMultipartFormDataFileUpload::test_upload_ok
```

See [Makefile](https://github.com/httpie/cli/blob/master/Makefile) for additional development utilities.

#### Running benchmarks

If you are trying to work on speeding up HTTPie and want to verify your results, you
can run the benchmark suite. The suite will compare the last commit of your branch
with the master branch of your repository (or a fresh checkout of HTTPie master, through
`--fresh`) and report the results back.

```bash
$ python extras/profiling/run.py
```

The benchmarks can also be run on the CI. Since it is a long process, it requires manual
oversight. Ping one of the maintainers to get a `benchmark` label on your branch.

#### Windows

If you are on a Windows machine and not able to run `make`,
follow the next steps for a basic setup. As a prerequisite, you need to have
Python 3.7+ installed.

Create a virtual environment and activate it:

```powershell
C:\> python -m venv --prompt httpie venv
C:\> venv\Scripts\activate
```

Install HTTPie in editable mode with all the dependencies:

```powershell
C:\> python -m pip install --upgrade -e .[dev]
```

You should now see `(httpie)` next to your shell prompt, and
the `http` command should point to your development copy:

```powershell
# In PowerShell:
(httpie) PS C:\Users\<user>\httpie> Get-Command http
CommandType     Name                                               Version    Source
-----------     ----                                               -------    ------
Application     http.exe                                           0.0.0.0    C:\Users\<user>\httpie\venv\Scripts\http.exe
```

```bash
# In CMD:
(httpie) C:\Users\<user>\httpie> where http
C:\Users\<user>\httpie\venv\Scripts\http.exe
C:\Users\<user>\AppData\Local\Programs\Python\Python38-32\Scripts\http.exe

(httpie) C:\Users\<user>\httpie> http --version
2.3.0-dev
```

Use `pytest` to run tests locally with an active virtual environment:

```bash
# Run all tests
$ python -m pytest
```

______________________________________________________________________

Finally, feel free to add yourself to [AUTHORS](https://github.com/httpie/cli/blob/master/AUTHORS.md)!


================================================
FILE: LICENSE
================================================
Copyright © 2012-2022 Jakub Roztocil <jakub@roztocil.co>

Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:

    1. Redistributions of source code must retain the above copyright notice,
       this list of conditions and the following disclaimer.

    2. Redistributions in binary form must reproduce the above copyright
       notice, this list of conditions and the following disclaimer in the
       documentation and/or other materials provided with the distribution.

    3. Neither the name of the copyright holder nor the names of its contributors
       may be used to endorse or promote products derived from this software
       without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.


================================================
FILE: MANIFEST.in
================================================
include LICENSE
include README.md
include CHANGELOG.md
include AUTHORS.md
include docs/README.md

# <https://github.com/httpie/cli/issues/182>
recursive-include tests/ *


================================================
FILE: Makefile
================================================
###############################################################################
# See ./CONTRIBUTING.md
###############################################################################

.PHONY: build

ROOT_DIR:=$(shell dirname $(realpath $(firstword $(MAKEFILE_LIST))))
VERSION=$(shell grep __version__ httpie/__init__.py)
H1="\n\n\033[0;32m\#\#\# "
H1END=" \#\#\# \033[0m\n"


# Only used to create our venv.
SYSTEM_PYTHON=python3

VENV_ROOT=venv
VENV_BIN=$(VENV_ROOT)/bin
VENV_PIP=$(VENV_BIN)/pip3
VENV_PYTHON=$(VENV_BIN)/python


export PATH := $(VENV_BIN):$(PATH)



default: list-tasks


###############################################################################
# Default task to get a list of tasks when `make' is run without args.
# <https://stackoverflow.com/questions/4219255>
###############################################################################

list-tasks:
	@echo Available tasks:
	@echo ----------------
	@$(MAKE) -pRrq -f $(lastword $(MAKEFILE_LIST)) : 2>/dev/null | awk -v RS= -F: '/^# File/,/^# Finished Make data base/ {if ($$1 !~ "^[#.]") {print $$1}}' | sort | grep -E -v -e '^[^[:alnum:]]' -e '^$@$$'
	@echo


###############################################################################
# Installation
###############################################################################

all: uninstall-httpie install test


install: venv install-reqs


install-reqs:
	@echo $(H1)Updating package tools$(H1END)
	$(VENV_PIP) install --upgrade pip wheel build

	@echo $(H1)Installing dev requirements$(H1END)
	$(VENV_PIP) install --upgrade '.[dev]' '.[test]'

	@echo $(H1)Installing HTTPie$(H1END)
	$(VENV_PIP) install --upgrade --editable .

	@echo


clean:
	@echo $(H1)Cleaning up$(H1END)
	rm -rf $(VENV_ROOT)
	# Remove symlink for virtualenvwrapper, if we’ve created one.
	[ -n "$(WORKON_HOME)" -a -L "$(WORKON_HOME)/httpie" -a -f "$(WORKON_HOME)/httpie" ] && rm $(WORKON_HOME)/httpie || true
	rm -rf *.egg dist build .coverage .cache .pytest_cache httpie.egg-info
	find . -name '__pycache__' -delete -o -name '*.pyc' -delete
	@echo


venv:
	@echo $(H1)Creating a Python environment $(VENV_ROOT) $(H1END)

	$(SYSTEM_PYTHON) -m venv --prompt httpie $(VENV_ROOT)

	@echo
	@echo done.
	@echo
	@echo To active it manually, run:
	@echo
	@echo "    source $(VENV_BIN)/activate"
	@echo
	@echo '(learn more: https://docs.python.org/3/library/venv.html)'
	@echo
	@if [ -n "$(WORKON_HOME)" ]; then \
		echo $(ROOT_DIR) >  $(VENV_ROOT)/.project; \
		if [ ! -d $(WORKON_HOME)/httpie -a ! -L $(WORKON_HOME)/httpie ]; then \
			ln -s $(ROOT_DIR)/$(VENV_ROOT) $(WORKON_HOME)/httpie ; \
			echo ''; \
			echo 'Since you use virtualenvwrapper, we created a symlink'; \
			echo 'so you can also use "workon httpie" to activate the venv.'; \
			echo ''; \
		fi; \
	fi


###############################################################################
# Testing
###############################################################################


test:
	@echo $(H1)Running tests$(HEADER_EXTRA)$(H1END)
	$(VENV_BIN)/python -m pytest $(COV)
	@echo


test-cover: COV=--cov=httpie --cov=tests
test-cover: HEADER_EXTRA=' (with coverage)'
test-cover: test


# test-all is meant to test everything — even this Makefile
test-all: clean install test test-dist codestyle
	@echo


test-dist: test-sdist test-bdist-wheel
	@echo


test-sdist: clean venv
	@echo $(H1)Testing sdist build an installation$(H1END)
	$(VENV_PIP) install build
	$(VENV_PYTHON) -m build --sdist
	$(VENV_PIP) install --force-reinstall --upgrade dist/*.gz
	$(VENV_BIN)/http --version
	@echo


test-bdist-wheel: clean venv
	@echo $(H1)Testing wheel build an installation$(H1END)
	$(VENV_PIP) install build
	$(VENV_PYTHON) -m build --wheel
	$(VENV_PIP) install --force-reinstall --upgrade dist/*.whl
	$(VENV_BIN)/http --version
	@echo


twine-check:
	twine check dist/*


# Kept for convenience, "make codestyle" is preferred though
pycodestyle: codestyle


codestyle:
	@echo $(H1)Running flake8$(H1END)
	@[ -f $(VENV_BIN)/flake8 ] || $(VENV_PIP) install --upgrade --editable '.[dev]'
	$(VENV_BIN)/flake8 httpie/ tests/ extras/profiling/ docs/packaging/brew/ *.py
	@echo


codecov-upload:
	@echo $(H1)Running codecov$(H1END)
	@[ -f $(VENV_BIN)/codecov ] || $(VENV_PIP) install codecov
	# $(VENV_BIN)/codecov --required
	$(VENV_BIN)/codecov
	@echo


doc-check:
	@echo $(H1)Running documentations checks$(H1END)
	mdl --git-recurse --style docs/markdownlint.rb .


###############################################################################
# Publishing to PyPi
###############################################################################


build:
	rm -rf build/ dist/
	mv httpie/internal/__build_channel__.py httpie/internal/__build_channel__.py.original
	echo 'BUILD_CHANNEL = "pip"' > httpie/internal/__build_channel__.py
	$(VENV_PYTHON) -m build --sdist --wheel --outdir dist/
	mv httpie/internal/__build_channel__.py.original httpie/internal/__build_channel__.py


publish: test-all publish-no-test


publish-no-test:
	@echo $(H1)Testing wheel build an installation$(H1END)
	@echo "$(VERSION)"
	@echo "$(VERSION)" | grep -q "dev" && echo '!!!Not publishing dev version!!!' && exit 1 || echo ok
	make build
	make twine-check
	$(VENV_BIN)/twine upload --repository=httpie dist/*
	@echo



###############################################################################
# Uninstalling
###############################################################################

uninstall-httpie:
	@echo $(H1)Uninstalling httpie$(H1END)
	- $(VENV_PIP) uninstall --yes httpie &2>/dev/null

	@echo "Verifying…"
	cd .. && ! $(VENV_PYTHON) -m httpie --version &2>/dev/null

	@echo "Done"
	@echo


###############################################################################
# Homebrew
###############################################################################

brew-deps:
	docs/packaging/brew/brew-deps.py

brew-test:
	@echo $(H1)Uninstalling httpie$(H1END)
	- brew uninstall httpie

	@echo $(H1)Building from source…$(H1END)
	- brew install --HEAD --build-from-source ./docs/packaging/brew/httpie.rb

	@echo $(H1)Verifying…$(H1END)
	http --version
	https --version

	@echo $(H1)Auditing…$(H1END)
	brew audit --strict httpie

###############################################################################
# Generated content
###############################################################################

content: man installation-docs

man: install
	@echo $(H1)Regenerate man pages$(H1END)
	$(VENV_PYTHON) extras/scripts/generate_man_pages.py

installation-docs:
	@echo $(H1)Updating installation instructions in the docs$(H1END)
	$(VENV_PYTHON) docs/installation/generate.py


================================================
FILE: README.md
================================================
<h2 align="center">
    <a href="https://httpie.io" target="blank_">
        <img height="100" alt="HTTPie" src="https://raw.githubusercontent.com/httpie/cli/master/docs/httpie-logo.svg" />
    </a>
    <br>
    HTTPie CLI: human-friendly HTTP client for the API era
</h2>

<div align="center">

[![HTTPie for Desktop](https://img.shields.io/static/v1?label=HTTPie&message=Desktop&color=4B78E6)](https://httpie.io/product)
[![](https://img.shields.io/static/v1?label=HTTPie&message=Web%20%26%20Mobile&color=73DC8C)](https://httpie.io/app)
[![](https://img.shields.io/static/v1?label=HTTPie&message=CLI&color=FA9BFA)](https://httpie.io/cli)
[![Twitter](https://img.shields.io/twitter/follow/httpie?style=flat&color=%234B78E6&logoColor=%234B78E6)](https://twitter.com/httpie)
[![Chat](https://img.shields.io/discord/725351238698270761?style=flat&label=Chat%20on%20Discord&color=%23FA9BFA)](https://httpie.io/discord)

</div>


<div align="center">

[![Docs](https://img.shields.io/badge/stable%20docs-httpie.io%2Fdocs%2Fcli-brightgreen?style=flat&color=%2373DC8C&label=Docs)](https://httpie.org/docs/cli)
[![Latest version](https://img.shields.io/pypi/v/httpie.svg?style=flat&label=Latest&color=%234B78E6&logo=&logoColor=white)](https://pypi.python.org/pypi/httpie)
[![Build](https://img.shields.io/github/actions/workflow/status/httpie/cli/tests.yml?branch=master&color=%23FA9BFA&label=Build)](https://github.com/httpie/cli/actions)
[![Coverage](https://img.shields.io/codecov/c/github/httpie/cli?style=flat&label=Coverage&color=%2373DC8C)](https://codecov.io/gh/httpie/cli)
[![PyPi downloads](https://img.shields.io/pepy/dt/httpie?style=flat&label=Downloads%20from%20PyPi%20only&color=4B78E6)](https://www.pepy.tech/projects/httpie)

</div>

HTTPie (pronounced _aitch-tee-tee-pie_) is a command-line HTTP client.
Its goal is to make CLI interaction with web services as human-friendly as possible.
HTTPie is designed for testing, debugging, and generally interacting with APIs & HTTP servers.
The `http` & `https` commands allow for creating and sending arbitrary HTTP requests.
They use simple and natural syntax and provide formatted and colorized output.

<div align="center">

<img src="https://raw.githubusercontent.com/httpie/cli/master/docs/httpie-animation.gif" alt="HTTPie in action" width="100%"/>


</div>




## We lost 54k GitHub stars

Please note we recently accidentally made this repo private for a moment, and GitHub deleted our community that took a decade to build. Read the full story here: https://httpie.io/blog/stardust

![](docs/stardust.png)


## Getting started

- [Installation instructions →](https://httpie.io/docs#installation)
- [Full documentation →](https://httpie.io/docs)

## Features

- Expressive and intuitive syntax
- Formatted and colorized terminal output
- Built-in JSON support
- Forms and file uploads
- HTTPS, proxies, and authentication
- Arbitrary request data
- Custom headers
- Persistent sessions
- `wget`-like downloads

[See all features →](https://httpie.io/docs)

## Examples

Hello World:

```bash
https httpie.io/hello
```

Custom [HTTP method](https://httpie.io/docs#http-method), [HTTP headers](https://httpie.io/docs#http-headers) and [JSON](https://httpie.io/docs#json) data:

```bash
http PUT pie.dev/put X-API-Token:123 name=John
```

Build and print a request without sending it using [offline mode](https://httpie.io/docs/cli/offline-mode):

```bash
http --offline pie.dev/post hello=offline
```

Use [GitHub API](https://developer.github.com/v3/issues/comments/#create-a-comment) to post a comment on an [Issue](https://github.com/httpie/cli/issues/83) with [authentication](https://httpie.io/docs#authentication):

```bash
http -a USERNAME POST https://api.github.com/repos/httpie/cli/issues/83/comments body='HTTPie is awesome! :heart:'
```

[See more examples →](https://httpie.io/docs#examples)

## Community & support

- Visit the [HTTPie website](https://httpie.io) for full documentation and useful links.
- Join our [Discord server](https://httpie.io/discord) is to ask questions, discuss features, and for general API chat.
- Tweet at [@httpie](https://twitter.com/httpie) on Twitter.
- Use [StackOverflow](https://stackoverflow.com/questions/tagged/httpie) to ask questions and include a `httpie` tag.
- Create [GitHub Issues](https://github.com/httpie/cli/issues) for bug reports and feature requests.
- Subscribe to the [HTTPie newsletter](https://httpie.io) for occasional updates.

## Contributing

Have a look through existing [Issues](https://github.com/httpie/cli/issues) and [Pull Requests](https://github.com/httpie/cli/pulls) that you could help with. If you'd like to request a feature or report a bug, please [create a GitHub Issue](https://github.com/httpie/cli/issues) using one of the templates provided.

[See contribution guide →](https://github.com/httpie/cli/blob/master/CONTRIBUTING.md)


================================================
FILE: SECURITY.md
================================================
# Security policy

## Reporting a vulnerability

When you identify a vulnerability in HTTPie, please report it privately using one of the following channels:

- Email to [`security@httpie.io`](mailto:security@httpie.io)
- Report on [huntr.dev](https://huntr.dev/)

In addition to the description of the vulnerability, include the following information:

- A short reproducer to verify it (it can be a small HTTP server, shell script, docker image, etc.)
- Your deemed severity level of the vulnerability (`LOW`/`MEDIUM`/`HIGH`/`CRITICAL`)
- [CWE](https://cwe.mitre.org/) ID, if available.


================================================
FILE: docs/README.md
================================================
<div class='hidden-website'>

# HTTPie documentation

</div>

HTTPie (pronounced _aitch-tee-tee-pie_) is a command-line HTTP client.
Its goal is to make CLI interaction with web services as human-friendly as possible.
HTTPie is designed for testing, debugging, and generally interacting with APIs & HTTP servers.
The `http` & `https` commands allow for creating and sending arbitrary HTTP requests.
They use simple and natural syntax and provide formatted and colorized output.

<div class='hidden-website'>

## About this document

This documentation is best viewed at [httpie.io/docs](https://httpie.org/docs).

You can select your corresponding HTTPie version as well as run examples directly from the browser using a [termible.io](https://termible.io?utm_source=httpie-readme) embedded terminal.

If you are reading this on GitHub, then this text covers the current *development* version.
You are invited to submit fixes and improvements to the docs by editing [this file](https://github.com/httpie/cli/blob/master/docs/README.md).

</div>

## Main features

- Expressive and intuitive syntax
- Formatted and colorized terminal output
- Built-in JSON support
- Forms and file uploads
- HTTPS, proxies, and authentication
- Arbitrary request data
- Custom headers
- Persistent sessions
- Wget-like downloads
- Linux, macOS, Windows, and FreeBSD support
- Plugins
- Documentation
- Test coverage

## Installation

<div data-installation-instructions>

<!--
THE INSTALLATION SECTION IS GENERATED

Do not edit here, but in docs/installation/.

-->

- [Universal](#universal)
- [macOS](#macos)
- [Windows](#windows)
- [Linux](#linux)
- [FreeBSD](#freebsd)

### Universal

#### PyPI

Please make sure you have Python 3.7 or newer (`python --version`).

```bash
# Install httpie
$ python -m pip install --upgrade pip wheel
$ python -m pip install httpie
```

```bash
# Upgrade httpie
$ python -m pip install --upgrade pip wheel
$ python -m pip install --upgrade httpie
```

### macOS

#### Homebrew

To install [Homebrew](https://brew.sh/), see [its installation](https://docs.brew.sh/Installation).

```bash
# Install httpie
$ brew update
$ brew install httpie
```

```bash
# Upgrade httpie
$ brew update
$ brew upgrade httpie
```

#### MacPorts

To install [MacPorts](https://www.macports.org/), see [its installation](https://www.macports.org/install.php).

```bash
# Install httpie
$ port selfupdate
$ port install httpie
```

```bash
# Upgrade httpie
$ port selfupdate
$ port upgrade httpie
```

### Windows

#### Chocolatey

To install [Chocolatey](https://chocolatey.org/), see [its installation](https://chocolatey.org/install).

```bash
# Install httpie
$ choco install httpie
```

```bash
# Upgrade httpie
$ choco upgrade httpie
```

### Linux

#### Debian and Ubuntu

Also works for other Debian-derived distributions like MX Linux, Linux Mint, deepin, Pop!_OS, KDE neon, Zorin OS, elementary OS, Kubuntu, Devuan, Linux Lite, Peppermint OS, Lubuntu, antiX, Xubuntu, etc.

```bash
# Install httpie
$ curl -SsL https://packages.httpie.io/deb/KEY.gpg | sudo gpg --dearmor -o /usr/share/keyrings/httpie.gpg
$ echo "deb [arch=amd64 signed-by=/usr/share/keyrings/httpie.gpg] https://packages.httpie.io/deb ./" | sudo tee /etc/apt/sources.list.d/httpie.list > /dev/null
$ sudo apt update
$ sudo apt install httpie
```

```bash
# Upgrade httpie
$ sudo apt update && sudo apt upgrade httpie
```

#### Fedora

```bash
# Install httpie
$ dnf install httpie
```

```bash
# Upgrade httpie
$ dnf upgrade httpie
```

#### CentOS and RHEL

Also works for other RHEL-derived distributions like ClearOS, Oracle Linux, etc.

```bash
# Install httpie
$ yum install epel-release
$ yum install httpie
```

```bash
# Upgrade httpie
$ yum upgrade httpie
```

#### Single binary executables

Get the standalone HTTPie Linux executables when you don't want to go through the full installation process.

```bash
# Install httpie
$ https --download packages.httpie.io/binaries/linux/http-latest -o http
$ ln -ls ./http ./https
$ chmod +x ./http ./https
```

```bash
# Upgrade httpie
$ https --download packages.httpie.io/binaries/linux/http-latest -o http
```

#### Snapcraft (Linux)

To install [Snapcraft](https://snapcraft.io/), see [its installation](https://snapcraft.io/docs/installing-snapd).

```bash
# Install httpie
$ snap install httpie
```

```bash
# Upgrade httpie
$ snap refresh httpie
```

#### Linuxbrew

To install [Linuxbrew](https://docs.brew.sh/Homebrew-on-Linux), see [its installation](https://docs.brew.sh/Homebrew-on-Linux#install).

```bash
# Install httpie
$ brew update
$ brew install httpie
```

```bash
# Upgrade httpie
$ brew update
$ brew upgrade httpie
```

#### Arch Linux

Also works for other Arch-derived distributions like ArcoLinux, EndeavourOS, Artix Linux, etc.

```bash
# Install httpie
$ pacman -Syu httpie
```

```bash
# Upgrade httpie
$ pacman -Syu
```

### FreeBSD

#### FreshPorts

```bash
# Install httpie
$ pkg install www/py-httpie
```

```bash
# Upgrade httpie
$ pkg upgrade www/py-httpie
```

<!-- /GENERATED SECTION -->

</div>

### Unstable version

If you want to try out the latest version of HTTPie that hasn't been officially released yet, you can install the development or unstable version directly from the master branch on GitHub. However, keep in mind that the development version is a work in progress and may not be as reliable as the stable version.

You can use the following command to install the development version of HTTPie on Linux, macOS, Windows, or FreeBSD operating systems. With this command, the code present in the `master` branch is downloaded and installed using `pip`.

```bash
$ python -m pip install --upgrade https://github.com/httpie/cli/archive/master.tar.gz
```

There are other ways to install the development version of HTTPie on macOS and Linux.

You can install it using Homebrew by running the following commands:

```bash
$ brew uninstall --force httpie
$ brew install --HEAD httpie
```

You can install it using Snapcraft by running the following commands:

```bash
$ snap remove httpie
$ snap install httpie --edge
```

To verify the installation, you can compare the [version identifier on GitHub](https://github.com/httpie/cli/blob/master/httpie/__init__.py#L6) with the one available on your machine. You can check the version of HTTPie on your machine by using the command `http --version`.

```bash
$ http --version
# 3.X.X.dev0
```

Note that on your machine, the version name will have the `.dev0` suffix.

## Usage

Hello World:

```bash
$ https httpie.io/hello
```

Synopsis:

```bash
$ http [flags] [METHOD] URL [ITEM [ITEM]]
```

See also `http --help` (and for systems where man pages are available, you can use `man http`).

### Examples

Custom [HTTP method](#http-method), [HTTP headers](#http-headers) and [JSON](#json) data:

```bash
$ http PUT pie.dev/put X-API-Token:123 name=John
```

Submitting [forms](#forms):

```bash
$ http -f POST pie.dev/post hello=World
```

See the request that is being sent using one of the [output options](#output-options):

```bash
$ http -v pie.dev/get
```

Build and print a request without sending it using [offline mode](#offline-mode):

```bash
$ http --offline pie.dev/post hello=offline
```

Use [GitHub API](https://developer.github.com/v3/issues/comments/#create-a-comment) to post a comment on an [issue](https://github.com/httpie/cli/issues/83) with [authentication](#authentication):

```bash
$ http -a USERNAME POST https://api.github.com/repos/httpie/cli/issues/83/comments body='HTTPie is awesome! :heart:'
```

Upload a file using [redirected input](#redirected-input):

```bash
$ http pie.dev/post < files/data.json
```

Download a file and save it via [redirected output](#redirected-output):

```bash
$ http pie.dev/image/png > image.png
```

Download a file `wget` style:

```bash
$ http --download pie.dev/image/png
```

Use named [sessions](#sessions) to make certain aspects of the communication persistent between requests to the same host:

```bash
$ http --session=logged-in -a username:password pie.dev/get API-Key:123
```

```bash
$ http --session=logged-in pie.dev/headers
```

Set a custom `Host` header to work around missing DNS records:

```bash
$ http localhost:8000 Host:example.com
```

## HTTP method

The name of the HTTP method comes right before the URL argument:

```bash
$ http DELETE pie.dev/delete
```

Which looks similar to the actual `Request-Line` that is sent:

```http
DELETE /delete HTTP/1.1
```

In addition to the standard methods (`GET`, `POST`, `HEAD`, `PUT`, `PATCH`, `DELETE`, etc.), you can use custom method names, for example:

```bash
$ http AHOY pie.dev/post
```

There are no restrictions regarding which request methods can include a body. You can send an empty `POST` request:

```bash
$ http POST pie.dev/post
```

You can also make `GET` requests containing a body:

```bash
$ http GET pie.dev/get hello=world
```

### Optional `GET` and `POST`

The `METHOD` argument is optional, and when you don’t specify it, HTTPie defaults to:

- `GET` for requests without body
- `POST` for requests with body

Here we don’t specify any request data, so both commands will send the same `GET` request:

```bash
$ http GET pie.dev/get
```

```bash
$ http pie.dev/get
```

Here, on the other hand, we do have some data, so both commands will make the same `POST` request:

```bash
$ http POST pie.dev/post hello=world
```

```bash
$ http pie.dev/post hello=world
```

## Request URL

The only information HTTPie needs to perform a request is a URL.

The default scheme is `http://` and can be omitted from the argument:

```bash
$ http example.org
# → http://example.org
```

HTTPie also installs an `https` executable, where the default scheme is `https://`:

```bash
$ https example.org
# → https://example.org
```

When you paste a URL into the terminal, you can even keep the `://` bit in the URL argument to quickly convert the URL into an HTTPie call just by adding a space after the protocol name.

```bash
$ https ://example.org
# → https://example.org
```

```bash
$ http ://example.org
# → http://example.org
```

### Querystring parameters

If you find yourself manually constructing URLs with querystring parameters on the terminal, you may appreciate the `param==value` syntax for appending URL parameters.

With that, you don’t have to worry about escaping the `&` separators for your shell. Additionally, any special characters in the parameter name or value get automatically URL-escaped (as opposed to the parameters specified in the full URL, which HTTPie doesn’t modify).

```bash
$ http https://api.github.com/search/repositories q==httpie per_page==1
```

```http
GET /search/repositories?q=httpie&per_page=1 HTTP/1.1
```

You can even retrieve the `value` from a file by using the `param==@file` syntax. This would also effectively strip the newlines from the end. See [file based separators](#file-based-separators) for more examples.

```bash
$ http pie.dev/get text==@files/text.txt
```

### URL shortcuts for `localhost`

Additionally, curl-like shorthand for localhost is supported.
This means that, for example, `:3000` would expand to `http://localhost:3000`.
If the port is omitted, then port 80 is assumed.

```bash
$ http :/foo
```

```http
GET /foo HTTP/1.1
Host: localhost
```

```bash
$ http :3000/bar
```

```http
GET /bar HTTP/1.1
Host: localhost:3000
```

```bash
$ http :
```

```http
GET / HTTP/1.1
Host: localhost
```

### Other default schemes

When HTTPie is invoked as `https` then the default scheme is `https://` (`$ https example.org` will make a request to `https://example.org`).

You can also use the `--default-scheme <URL_SCHEME>` option to create shortcuts for other protocols than HTTP (possibly supported via [plugins](https://pypi.org/search/?q=httpie)). Example for the [httpie-unixsocket](https://github.com/httpie/httpie-unixsocket) plugin:

```bash
# Before
$ http http+unix://%2Fvar%2Frun%2Fdocker.sock/info
```

```bash
# Create an alias
$ alias http-unix='http --default-scheme="http+unix"'
```

```bash
# Now the scheme can be omitted
$ http-unix %2Fvar%2Frun%2Fdocker.sock/info
```

### `--path-as-is`

The standard behavior of HTTP clients is to normalize the path portion of URLs by squashing dot segments as a typical filesystem would:

```bash
$ http -v example.org/./../../etc/password
```

```http
GET /etc/password HTTP/1.1
```

The `--path-as-is` option allows you to disable this behavior:

```bash
$ http --path-as-is -v example.org/./../../etc/password
```

```http
GET /../../etc/password HTTP/1.1
```

## Request items

There are a few different *request item* types that provide a convenient
mechanism for specifying HTTP headers, JSON and form data, files,
and URL parameters. This is a very practical way of constructing
HTTP requests from scratch on the CLI.

Each *request item* is simply a key/value pair separated with the following
characters: `:` (headers), `=` (data field, e.g., JSON, form), `:=` (raw data field)
`==` (query parameters), `@` (file upload).

```bash
$ http PUT pie.dev/put \
    X-Date:today \                     # Header
    token==secret \                    # Query parameter
    name=John \                        # Data field
    age:=29                            # Raw JSON
```

|                                                    Item Type | Description                                                                                                                                                                                                            |
|-------------------------------------------------------------:|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
|                                    HTTP Headers `Name:Value` | Arbitrary HTTP header, e.g. `X-API-Token:123`                                                                                                                                                                          |
|                                 URL parameters `name==value` | Appends the given name/value pair as a querystring parameter to the URL. The `==` separator is used.                                                                                                                   |
|                                    Data Fields `field=value` | Request data fields to be serialized as a JSON object (default), to be form-encoded (with `--form, -f`), or to be serialized as `multipart/form-data` (with `--multipart`)                                             |
|                                Raw JSON fields `field:=json` | Useful when sending JSON and one or more fields need to be a `Boolean`, `Number`, nested `Object`, or an `Array`, e.g., `meals:='["ham","spam"]'` or `pies:='[1,2,3]'` (note the quotes)                                 |
| File upload fields `field@/dir/file`, `field@file;type=mime` | Only available with `--form`, `-f` and `--multipart`. For example `screenshot@~/Pictures/img.png`, or `'cv@cv.txt;type=text/markdown'`. With `--form`, the presence of a file field results in a `--multipart` request |

Note that the structured data fields aren’t the only way to specify request data:
[raw request body](#raw-request-body) is a mechanism for passing arbitrary request data.

### File based separators

Using file contents as values for specific fields is a very common use case, which can be achieved through adding the `@` suffix to
the operators above. For example, instead of using a static string as the value for some header, you can use `:@` operator
to pass the desired value from a file.

```bash
$ http POST pie.dev/post \
    X-Data:@files/text.txt             # Read a header from a file
    token==@files/text.txt             # Read a query parameter from a file
    name=@files/text.txt               # Read a data field’s value from a file
    bookmarks:=@files/data.json        # Embed a JSON object from a file
```

### Escaping rules

You can use `\` to escape characters that shouldn’t be used as separators (or parts thereof). For instance, `foo\==bar` will become a data key/value pair (`foo=` and `bar`) instead of a URL parameter.

Often it is necessary to quote the values, e.g. `foo='bar baz'`.

If any of the field names or headers starts with a minus (e.g. `-fieldname`), you need to place all such items after the special token `--` to prevent confusion with `--arguments`:

```bash
$ http pie.dev/post -- -name-starting-with-dash=foo -Unusual-Header:bar
```

```http
POST /post HTTP/1.1
-Unusual-Header: bar
Content-Type: application/json

{
    "-name-starting-with-dash": "foo"
}
```

## JSON

JSON is the *lingua franca* of modern web services, and it is also the **implicit content type** HTTPie uses by default.

Simple example:

```bash
$ http PUT pie.dev/put name=John email=john@example.org
```

```http
PUT / HTTP/1.1
Accept: application/json, */*;q=0.5
Accept-Encoding: gzip, deflate
Content-Type: application/json
Host: pie.dev

{
    "name": "John",
    "email": "john@example.org"
}
```

### Default behavior

If your command includes some data [request items](#request-items), they are serialized as a JSON object by default. HTTPie also automatically sets the following headers, both of which can be overwritten:

|         Header | Value                         |
|---------------:|-------------------------------|
| `Content-Type` | `application/json`            |
|       `Accept` | `application/json, */*;q=0.5` |

### Explicit JSON

You can use `--json, -j` to explicitly set `Accept` to `application/json` regardless of whether you are sending data (it’s a shortcut for setting the header via the usual header notation: `http url Accept:'application/json, */*;q=0.5'`).
Additionally, HTTPie will try to detect JSON responses even when the `Content-Type` is incorrectly `text/plain` or unknown.

### Non-string JSON fields

Non-string JSON fields use the `:=` separator, which allows you to embed arbitrary JSON data into the resulting JSON object.
Additionally, text and raw JSON files can also be embedded into fields using `=@` and `:=@`:

```bash
$ http PUT pie.dev/put \
    name=John \                        # String (default)
    age:=29 \                          # Raw JSON — Number
    married:=false \                   # Raw JSON — Boolean
    hobbies:='["http", "pies"]' \      # Raw JSON — Array
    favorite:='{"tool": "HTTPie"}' \   # Raw JSON — Object
    bookmarks:=@files/data.json \      # Embed JSON file
    description=@files/text.txt        # Embed text file
```

```http
PUT /person/1 HTTP/1.1
Accept: application/json, */*;q=0.5
Content-Type: application/json
Host: pie.dev

{
    "age": 29,
    "hobbies": [
        "http",
        "pies"
    ],
    "description": "John is a nice guy who likes pies.",
    "married": false,
    "name": "John",
    "favorite": {
        "tool": "HTTPie"
    },
    "bookmarks": {
        "HTTPie": "https://httpie.org",
    }
}
```

The `:=`/`:=@` syntax is JSON-specific. You can switch your request to `--form` or `--multipart`,
and string, float, and number values will continue to be serialized (as string form values).
Other JSON types, however, are not allowed with `--form` or `--multipart`.

### Nested JSON

If your use case involves sending complex JSON objects as part of the request body,
HTTPie can help you build them right from your terminal. You still use the existing
data field operators (`=`/`:=`) but instead of specifying a top-level field name (like `key=value`),
you specify a path declaration. This tells HTTPie where and how to put the given value inside an object:

```bash
http pie.dev/post \
  platform[name]=HTTPie \
  platform[about][mission]='Make APIs simple and intuitive' \
  platform[about][homepage]=httpie.io \
  platform[about][homepage]=httpie.io \
  platform[about][stars]:=54000 \
  platform[apps][]=Terminal \
  platform[apps][]=Desktop \
  platform[apps][]=Web \
  platform[apps][]=Mobile
```

```json
{
    "platform": {
        "name": "HTTPie",
        "about": {
            "mission": "Make APIs simple and intuitive",
            "homepage": "httpie.io",
            "stars": 54000
        },
        "apps": [
            "Terminal",
            "Desktop",
            "Web",
            "Mobile"
        ]
    }
}
```

#### Introduction

Let’s start with a simple example, and build a simple search query:

```bash
$ http --offline --print=B pie.dev/post \
  category=tools \
  search[type]=id \
  search[id]:=1
```

In the example above, the `search[type]` is an instruction for creating an object called `search`, and setting the `type` field of it to the given value (`"id"`).

Also note that, just as the regular syntax, you can use the `:=` operator to directly pass raw JSON values (e.g., numbers in the case above).

```json
{
    "category": "tools",
    "search": {
        "id": 1,
        "type": "id"
    }
}
```

Building arrays is also possible, through `[]` suffix (an append operation). This tells HTTPie to create an array in the given path (if there is not one already), and append the given value to that array.

```bash
$ http --offline --print=B pie.dev/post \
  category=tools \
  search[type]=keyword \
  search[keywords][]=APIs \
  search[keywords][]=CLI
```

```json
{
    "category": "tools",
    "search": {
        "keywords": [
            "APIs",
            "CLI"
        ],
        "type": "keyword"
    }
}
```

If you want to explicitly specify the position of elements inside an array,
you can simply pass the desired index as the path:

```bash
$ http --offline --print=B pie.dev/post \
  category=tools \
  search[type]=keyword \
  search[keywords][1]=APIs \
  search[keywords][0]=CLI
```

```json
{
    "category": "tools",
    "search": {
        "keywords": [
            "CLIs",
            "API"
        ],
        "type": "keyword"
    }
}
```

If there are any missing indexes, HTTPie will nullify them in order to create a concrete object that can be sent:

```bash
$ http --offline --print=B pie.dev/post \
  category=tools \
  search[type]=platforms \
  search[platforms][]=Terminal \
  search[platforms][1]=Desktop \
  search[platforms][3]=Mobile
```

```json
{
    "category": "tools",
    "search": {
        "platforms": [
            "Terminal",
            "Desktop",
            null,
            "Mobile"
        ],
        "type": "platforms"
    }
}
```

It is also possible to embed raw JSON to a nested structure, for example:

```bash
$ http --offline --print=B pie.dev/post \
  category=tools \
  search[type]=platforms \
  'search[platforms]:=["Terminal", "Desktop"]' \
  search[platforms][]=Web \
  search[platforms][]=Mobile
```

```json
{
    "category": "tools",
    "search": {
        "platforms": [
            "Terminal",
            "Desktop",
            "Web",
            "Mobile"
        ],
        "type": "platforms"
    }
}
```

And just to demonstrate all of these features together, let’s create a very deeply nested JSON object:

```bash
$ http PUT pie.dev/put \
    shallow=value \                                # Shallow key-value pair
    object[key]=value \                            # Nested key-value pair
    array[]:=1 \                                   # Array — first item
    array[1]:=2 \                                  # Array — second item
    array[2]:=3 \                                  # Array — append (third item)
    very[nested][json][3][httpie][power][]=Amaze   # Nested object
```

#### Advanced usage

##### Top level arrays

If you want to send an array instead of a regular object, you can simply
do that by omitting the starting key:

```bash
$ http --offline --print=B pie.dev/post \
    []:=1 \
    []:=2 \
    []:=3
```

```json
[
    1,
    2,
    3
]
```

You can also apply the nesting to the items by referencing their index:

```bash
http --offline --print=B pie.dev/post \
    [0][type]=platform [0][name]=terminal \
    [1][type]=platform [1][name]=desktop
```

```json
[
    {
        "type": "platform",
        "name": "terminal"
    },
    {
        "type": "platform",
        "name": "desktop"
    }
]
```

Sending scalar JSON types (a single `null`, `true`, `false`,  string or number) as the top-level object is impossible using the key/value syntax. But you can still pass it via [`--raw='<value>'`](#raw-request-body).

##### Escaping behavior

Nested JSON syntax uses the same [escaping rules](#escaping-rules) as
the terminal. There are 3 special characters, and 1 special token that you can escape.

If you want to send a bracket as is, escape it with a backslash (`\`):

```bash
$ http --offline --print=B pie.dev/post \
  'foo\[bar\]:=1' \
  'baz[\[]:=2' \
  'baz[\]]:=3'
```

```json
{
    "baz": {
        "[": 2,
        "]": 3
    },
    "foo[bar]": 1
}
```

If you want to send the literal backslash character (`\`), escape it with another backslash:

```bash
$ http --offline --print=B pie.dev/post \
  'backslash[\\]:=1'
```

```json
{
    "backslash": {
        "\\": 1
    }
}
```

A regular integer in a path (e.g `[10]`) means an array index; but if you want it to be treated as
a string, you can escape the whole number by using a backslash (`\`) prefix.

```bash
$ http --offline --print=B pie.dev/post \
  'object[\1]=stringified' \
  'object[\100]=same' \
  'array[1]=indexified'
```

```json
{
    "array": [
        null,
        "indexified"
    ],
    "object": {
        "1": "stringified",
        "100": "same"
    }
}
```

##### Guiding syntax errors

If you make a typo or forget to close a bracket, the errors will guide you to fix it. For example:

```bash
$ http --offline --print=B pie.dev/post \
  'foo[bar]=OK' \
  'foo[baz][quux=FAIL'
```

```console
HTTPie Syntax Error: Expecting ']'
foo[baz][quux
             ^
```

You can follow to given instruction (adding a `]`) and repair your expression.

##### Type safety

Each container path (e.g., `x[y][z]` in `x[y][z][1]`) has a certain type, which gets defined with
the first usage and can’t be changed after that. If you try to do a key-based access to an array or
an index-based access to an object, HTTPie will error out:

```bash
$ http --offline --print=B pie.dev/post \
  'array[]:=1' \
  'array[]:=2' \
  'array[key]:=3'
HTTPie Type Error: Can't perform 'key' based access on 'array' which has a type of 'array' but this operation requires a type of 'object'.
array[key]
     ^^^^^
```

Type Safety does not apply to value overrides, for example:

```bash
$ http --offline --print=B pie.dev/post \
  user[name]:=411     # Defined as an integer
  user[name]=string   # Overridden with a string
```

```json
{
    "user": {
        "name": "string"
    }
}
```

### Raw JSON

For very complex JSON structures, it may be more convenient to [pass it as raw request body](#raw-request-body), for example:

```bash
$ echo -n '{"hello": "world"}' | http POST pie.dev/post
```

```bash
$ http POST pie.dev/post < files/data.json
```

## Forms

Submitting forms is very similar to sending [JSON](#json) requests.
Often the only difference is in adding the `--form, -f` option, which ensures that data fields are serialized as key-value tuples separated by '&', with a '=' between the key and the value. In addition `Content-Type` is set to `application/x-www-form-urlencoded; charset=utf-8`.
It is possible to make form data the implicit content type instead of JSON via the [config](#config) file.

### Regular forms

```bash
$ http --form POST pie.dev/post name='John Smith'
```

```http
POST /post HTTP/1.1
Content-Type: application/x-www-form-urlencoded; charset=utf-8

name=John+Smith
```

### File upload forms

If one or more file fields is present, the serialization and content type is `multipart/form-data`:

```bash
$ http -f POST pie.dev/post name='John Smith' cv@~/files/data.xml
```

The request above is the same as if the following HTML form were submitted:

```html
<form enctype="multipart/form-data" method="post" action="http://example.com/jobs">
    <input type="text" name="name" />
    <input type="file" name="cv" />
</form>
```

Please note that `@` is used to simulate a file upload form field, whereas `=@` just embeds the file content as a regular text field value.

When uploading files, their content type is inferred from the file name. You can manually override the inferred content type:

```bash
$ http -f POST pie.dev/post name='John Smith' cv@'~/files/data.bin;type=application/pdf'
```

To perform a `multipart/form-data` request even without any files, use `--multipart` instead of `--form`:

```bash
$ http --multipart --offline example.org hello=world
```

```http
POST / HTTP/1.1
Content-Length: 129
Content-Type: multipart/form-data; boundary=c31279ab254f40aeb06df32b433cbccb
Host: example.org

--c31279ab254f40aeb06df32b433cbccb
Content-Disposition: form-data; name="hello"

world
--c31279ab254f40aeb06df32b433cbccb--
```

File uploads are always streamed to avoid memory issues with large files.

By default, HTTPie uses a random unique string as the multipart boundary, but you can use `--boundary` to specify a custom string instead:

```bash
$ http --form --multipart --boundary=xoxo --offline example.org hello=world
```

```http
POST / HTTP/1.1
Content-Length: 129
Content-Type: multipart/form-data; boundary=xoxo
Host: example.org

--xoxo
Content-Disposition: form-data; name="hello"

world
--xoxo--
```

If you specify a custom `Content-Type` header without including the boundary bit, HTTPie will add the boundary value (explicitly specified or auto-generated) to the header automatically:

```bash
$ http --form --multipart --offline example.org hello=world Content-Type:multipart/letter
```

```http
POST / HTTP/1.1
Content-Length: 129
Content-Type: multipart/letter; boundary=c31279ab254f40aeb06df32b433cbccb
Host: example.org

--c31279ab254f40aeb06df32b433cbccb
Content-Disposition: form-data; name="hello"

world
--c31279ab254f40aeb06df32b433cbccb--
```

## HTTP headers

To set custom headers you can use the `Header:Value` notation:

```bash
$ http pie.dev/headers User-Agent:Bacon/1.0 'Cookie:valued-visitor=yes;foo=bar' \
    X-Foo:Bar Referer:https://httpie.org/
```

```http
GET /headers HTTP/1.1
Accept: */*
Accept-Encoding: gzip, deflate
Cookie: valued-visitor=yes;foo=bar
Host: pie.dev
Referer: https://httpie.org/
User-Agent: Bacon/1.0
X-Foo: Bar
```

### Default request headers

There are a couple of default headers that HTTPie sets:

```http
GET / HTTP/1.1
Accept: */*
Accept-Encoding: gzip, deflate
User-Agent: HTTPie/<version>
Host: <taken-from-URL>
```

All of these can be overwritten or unset (see below).

### Reading headers from a file

You can read headers from a file by using the `:@` operator. This would also effectively strip the newlines from the end. See [file based separators](#file-based-separators) for more examples.

```bash
$ http pie.dev/headers X-Data:@files/text.txt
```

### Empty headers and header un-setting

To unset a previously specified header (such a one of the default headers), use `Header:`:

```bash
$ http pie.dev/headers Accept: User-Agent:
```

To send a header with an empty value, use `Header;`, with a semicolon:

```bash
$ http pie.dev/headers 'Header;'
```

Please note that some internal headers, such as `Content-Length`, can’t be unset if
they are automatically added by the client itself.

### Multiple header values with the same name

If the request is sent with multiple headers that are sharing the same name, then
the HTTPie will send them individually.

```bash
http --offline example.org Cookie:one Cookie:two
```

```http
GET / HTTP/1.1
Cookie: one
Cookie: two
```

It is also possible to pass a single header value pair, where the value is a comma
separated list of header values. Then the client will send it as a single header.

```bash
http --offline example.org Numbers:one,two
```

```http
GET / HTTP/1.1
Numbers: one,two
```

Also be aware that if the current session contains any headers they will get overwritten
by individual commands when sending a request instead of being joined together.

### Limiting response headers

The `--max-headers=n` option allows you to control the number of headers HTTPie reads before giving up (the default `0`, i.e., there’s no limit).

```bash
$ http --max-headers=100 pie.dev/get
```

## Offline mode

Use `--offline` to construct HTTP requests without sending them anywhere.
With `--offline`, HTTPie builds a request based on the specified options and arguments, prints it to `stdout`, and then exits. It works completely offline; no network connection is ever made. This has a number of use cases, including:

Generating API documentation examples that you can copy & paste without sending a request:

```bash
$ http --offline POST server.chess/api/games API-Key:ZZZ w=magnus b=hikaru t=180 i=2
```

```bash
$ http --offline MOVE server.chess/api/games/123 API-Key:ZZZ p=b a=R1a3 t=77
```

Generating raw requests that can be sent with any other client:

```bash
# 1. save a raw request to a file:
$ http --offline POST pie.dev/post hello=world > request.http
```

```bash
# 2. send it over the wire with, for example, the fantastic netcat tool:
$ nc pie.dev 80 < request.http
```

You can also use the `--offline` mode for debugging and exploring HTTP and HTTPie, and for “dry runs”.

`--offline` has the side effect of automatically activating `--print=HB`, i.e., both the request headers and the body
are printed. You can customize the output with the usual [output options](#output-options), with the exception where there
is no response to be printed. You can use `--offline` in combination with all the other options (e.g. `--session`).

## Cookies

HTTP clients send cookies to the server as regular [HTTP headers](#http-headers).
That means, HTTPie does not offer any special syntax for specifying cookies — the usual `Header:Value` notation is used:

Send a single cookie:

```bash
$ http pie.dev/cookies Cookie:sessionid=foo
```

```http
GET / HTTP/1.1
Accept: */*
Accept-Encoding: gzip, deflate
Connection: keep-alive
Cookie: sessionid=foo
Host: pie.dev
User-Agent: HTTPie/0.9.9
```

Send multiple cookies (note: the header is quoted to prevent the shell from interpreting the `;`):

```bash
$ http pie.dev/cookies 'Cookie:sessionid=foo;another-cookie=bar'
```

```http
GET / HTTP/1.1
Accept: */*
Accept-Encoding: gzip, deflate
Connection: keep-alive
Cookie: sessionid=foo;another-cookie=bar
Host: pie.dev
User-Agent: HTTPie/0.9.9
```

If you often deal with cookies in your requests, then you’d appreciate
the [sessions](#sessions) feature.

## Authentication

The currently supported authentication schemes are Basic and Digest (see [auth plugins](#auth-plugins) for more). There are two flags that control authentication:

|              Flag | Arguments                                                                                                                                                                                                                                                                                                                                                                                                                                 |
|------------------:|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
|      `--auth, -a` | Pass either a `username:password` pair or a `token` as the argument. If the selected authenticated method requires username/password combination and if you only specify a username (`-a username`), you’ll be prompted for the password before the request is sent. To send an empty password, pass `username:`. The `username:password@hostname` URL syntax is supported as well (but credentials passed via `-a` have higher priority) |
| `--auth-type, -A` | Specify the auth mechanism. Possible values are `basic`, `digest`, `bearer` or the name of any [auth plugins](#auth-plugins) you have installed. The default value is `basic` so it can often be omitted                                                                                                                                                                                                                                  |

### Basic auth

```bash
$ http -a username:password pie.dev/basic-auth/username/password
```

### Digest auth

```bash
$ http -A digest -a username:password pie.dev/digest-auth/httpie/username/password
```

### Bearer auth

```bash
https -A bearer -a token pie.dev/bearer
```

### Password prompt

If you omit the password part of `--auth, -a`, HTTPie securely prompts you for it:

```bash
$ http -a username pie.dev/basic-auth/username/password
```

Please note that when you use [`--session`](#sessions), prompted passwords are persisted in session files.

### Empty password

To send an empty password without being prompted for it, include a trailing colon in the credentials:

```bash
$ http -a username: pie.dev/headers
```

### `.netrc`

Authentication information from your `~/.netrc` file is by default honored as well.

For example:

```bash
$ cat ~/.netrc
machine pie.dev
login httpie
password test
```

```bash
$ http pie.dev/basic-auth/httpie/test
HTTP/1.1 200 OK
[...]
```

This can be disabled with the `--ignore-netrc` option:

```bash
$ http --ignore-netrc pie.dev/basic-auth/httpie/test
HTTP/1.1 401 UNAUTHORIZED
[...]
```

### Auth plugins

Additional authentication mechanism can be installed as plugins.
They can be found on the [Python Package Index](https://pypi.python.org/pypi?%3Aaction=search&term=httpie&submit=search).
Here are a few picks:

- [httpie-api-auth](https://github.com/pd/httpie-api-auth): ApiAuth
- [httpie-aws-auth](https://github.com/httpie/httpie-aws-auth): AWS / Amazon S3
- [httpie-edgegrid](https://github.com/akamai-open/httpie-edgegrid): EdgeGrid
- [httpie-hmac-auth](https://github.com/guardian/httpie-hmac-auth): HMAC
- [httpie-jwt-auth](https://github.com/teracyhq/httpie-jwt-auth): JWTAuth (JSON Web Tokens)
- [httpie-negotiate](https://github.com/ndzou/httpie-negotiate): SPNEGO (GSS Negotiate)
- [httpie-ntlm](https://github.com/httpie/httpie-ntlm): NTLM (NT LAN Manager)
- [httpie-oauth1](https://github.com/qcif/httpie-oauth1): OAuth 1.0a
- [requests-hawk](https://github.com/mozilla-services/requests-hawk): Hawk

See [plugin manager](#plugin-manager) for more details.

## HTTP redirects

By default, HTTP redirects are not followed and only the first
response is shown:

```bash
$ http pie.dev/redirect/3
```

### Follow `Location`

To instruct HTTPie to follow the `Location` header of `30x` responses
and show the final response instead, use the `--follow, -F` option:

```bash
$ http --follow pie.dev/redirect/3
```

With `307 Temporary Redirect` and `308 Permanent Redirect`, the method and the body of the original request
are reused to perform the redirected request. Otherwise, a body-less `GET` request is performed.

### Showing intermediary redirect responses

If you wish to see the intermediary requests/responses,
then use the `--all` option:

```bash
$ http --follow --all pie.dev/redirect/3
```

### Limiting maximum redirects followed

To change the default limit of maximum `30` redirects, use the `--max-redirects=<limit>` option:

```bash
$ http --follow --all --max-redirects=2 pie.dev/redirect/3
```

## Proxies

You can specify proxies to be used through the `--proxy` argument for each protocol (which is included in the value in case of redirects across protocols):

```bash
$ http --proxy=http:http://10.10.1.10:3128 --proxy=https:https://10.10.1.10:1080 example.org
```

With Basic authentication:

```bash
$ http --proxy=http:http://user:pass@10.10.1.10:3128 example.org
```

### Environment variables

You can also configure proxies by environment variables `ALL_PROXY`, `HTTP_PROXY` and `HTTPS_PROXY`, and the underlying
[Requests library](https://requests.readthedocs.io/en/latest/) will pick them up.
If you want to disable proxies configured through the environment variables for certain hosts, you can specify them in `NO_PROXY`.

In your `~/.bash_profile`:

```bash
export HTTP_PROXY=http://10.10.1.10:3128
export HTTPS_PROXY=https://10.10.1.10:1080
export NO_PROXY=localhost,example.com
```

### SOCKS

Usage for SOCKS is the same as for other types of [proxies](#proxies):

```bash
$ http --proxy=http:socks5://user:pass@host:port --proxy=https:socks5://user:pass@host:port example.org
```

## HTTPS

### Server SSL certificate verification

To skip the host’s SSL certificate verification, you can pass `--verify=no` (default is `yes`):

```bash
$ http --verify=no https://pie.dev/get
```

### Custom CA bundle

You can also use `--verify=<CA_BUNDLE_PATH>` to set a custom CA bundle path:

```bash
$ http --verify=/ssl/custom_ca_bundle https://example.org
```

### Client side SSL certificate

To use a client side certificate for the SSL communication, you can pass
the path of the cert file with `--cert`:

```bash
$ http --cert=client.pem https://example.org
```

If the private key is not contained in the cert file, you may pass the
path of the key file with `--cert-key`:

```bash
$ http --cert=client.crt --cert-key=client.key https://example.org
```

If the given private key requires a passphrase, HTTPie will automatically detect it
and ask it through a prompt:

```bash
$ http --cert=client.pem --cert-key=client.key https://example.org
http: passphrase for client.key: ****
```

If you don't want to see a prompt, you can supply the passphrase with the `--cert-key-pass`
argument:

```bash
$ http --cert=client.pem --cert-key=client.key --cert-key-pass=my_password https://example.org
```

### SSL version

Use the `--ssl=<PROTOCOL>` option to specify the desired protocol version to use.
This will default to SSL v2.3 which will negotiate the highest protocol that both the server and your installation of OpenSSL support.
The available protocols are `ssl2.3`, `ssl3`, `tls1`, `tls1.1`, `tls1.2`, `tls1.3`.
(The actually available set of protocols may vary depending on your OpenSSL installation.)

```bash
# Specify the vulnerable SSL v3 protocol to talk to an outdated server:
$ http --ssl=ssl3 https://vulnerable.example.org
```

### SSL ciphers

You can specify the available ciphers with `--ciphers`.
It should be a string in the [OpenSSL cipher list format](https://www.openssl.org/docs/man1.1.0/man1/ciphers.html).

```bash
$ http --ciphers=ECDHE-RSA-AES128-GCM-SHA256 https://pie.dev/get
```

Note: these cipher strings do not change the negotiated version of SSL or TLS, they only affect the list of available cipher suites.

To see the default cipher string, run `http --help` and see the `--ciphers` section under SSL.

## Output options

By default, HTTPie only outputs the final response and the whole response
message is printed (headers as well as the body). You can control what should
be printed via several options:

|                     Option | What is printed                                                                                    |
|---------------------------:|----------------------------------------------------------------------------------------------------|
|            `--headers, -h` | Only the response headers are printed                                                              |
|               `--body, -b` | Only the response body is printed                                                                  |
|               `--meta, -m` | Only the [response metadata](#response-meta) is printed                                            |
|            `--verbose, -v` | Print the whole HTTP exchange (request and response). This option also enables `--all` (see below) |
| `--verbose --verbose, -vv` | Just like `-v`, but also include the response metadata.                                            |
|              `--print, -p` | Selects parts of the HTTP exchange                                                                 |
|              `--quiet, -q` | Don’t print anything to `stdout` and `stderr`                                                      |

### What parts of the HTTP exchange should be printed

All the other [output options](#output-options) are under the hood just shortcuts for the more powerful `--print, -p`.
It accepts a string of characters each of which represents a specific part of the HTTP exchange:

| Character | Stands for                      |
|----------:|---------------------------------|
|       `H` | request headers                 |
|       `B` | request body                    |
|       `h` | response headers                |
|       `b` | response body                   |
|       `m` | [response meta](#response-meta) |

Print request and response headers:

```bash
$ http --print=Hh PUT pie.dev/put hello=world
```

#### Response meta

The response metadata section currently includes the total time elapsed. It’s the number of seconds between opening the network connection and downloading the last byte of response the body.


To _only_ show the response metadata, use `--meta, -m` (analogically to `--headers, -h` and `--body, -b`):

```bash
$ http --meta pie.dev/delay/1
```

```console
Elapsed time: 1.099171542s
```

The [extra verbose `-vv` output](#extra-verbose-output) includes the meta section by default. You can also show it in combination with other parts of the exchange via [`--print=m`](#what-parts-of-the-http-exchange-should-be-printed). For example, here we print it together with the response headers:

```bash
$ http --print=hm pie.dev/get
```

```http
HTTP/1.1 200 OK
Content-Type: application/json

Elapsed time: 0.077538375s
```


Please note that it also includes time spent on formatting the output, which adds a small penalty. Also, if the body is not part of the output, [we don’t spend time downloading it](#conditional-body-download).

If you [use `--style` with one of the Pie themes](#colors-and-formatting), you’ll see the time information color-coded (green/yellow/orange/red) based on how long the exchange took.


### Verbose output

`--verbose` can often be useful for debugging the request and generating documentation examples:

```bash
$ http --verbose PUT pie.dev/put hello=world
PUT /put HTTP/1.1
Accept: application/json, */*;q=0.5
Accept-Encoding: gzip, deflate
Content-Type: application/json
Host: pie.dev
User-Agent: HTTPie/0.2.7dev

{
    "hello": "world"
}

HTTP/1.1 200 OK
Connection: keep-alive
Content-Length: 477
Content-Type: application/json
Date: Sun, 05 Aug 2012 00:25:23 GMT
Server: gunicorn/0.13.4

{
    […]
}
```

#### Extra verbose output

If you run HTTPie with `-vv` or `--verbose --verbose`, then it would also display the [response metadata](#response-meta).

```bash
# Just like the above, but with additional columns like the total elapsed time
$ http -vv pie.dev/get
```

### Quiet output

`--quiet` redirects all output that would otherwise go to `stdout` and `stderr` to `/dev/null` (except for errors and warnings).
This doesn’t affect output to a file via `--output` or `--download`.

```bash
# There will be no output:
$ http --quiet pie.dev/post enjoy='the silence'
```

If you’d like to silence warnings as well, use `-q` or `--quiet` twice:

```bash
# There will be no output, even in case of an unexpected response status code:
$ http -qq --check-status pie.dev/post enjoy='the silence without warnings'
```

### Update warnings

When there is a new release available for your platform (for example; if you installed HTTPie through `pip`, it will check the latest version on `PyPI`), HTTPie will regularly warn you about the new update (once a week). If you want to disable this behavior, you can set `disable_update_warnings` to `true` in your [config](#config) file.

### Viewing intermediary requests/responses

To see all the HTTP communication, i.e. the final request/response as well as any possible intermediary requests/responses, use the `--all` option.
The intermediary HTTP communication include followed redirects (with `--follow`), the first unauthorized request when HTTP digest authentication is used (`--auth=digest`), etc.

```bash
# Include all responses that lead to the final one:
$ http --all --follow pie.dev/redirect/3
```

The intermediary requests/responses are by default formatted according to `--print, -p` (and its shortcuts described above).

### Conditional body download

As an optimization, the response body is downloaded from the server only if it’s part of the output.
This is similar to performing a `HEAD` request, except that it applies to any HTTP method you use.

Let’s say that there is an API that returns the whole resource when it is updated, but you are only interested in the response headers to see the status code after an update:

```bash
$ http --headers PATCH pie.dev/patch name='New Name'
```

Since you are only printing the HTTP headers here, the connection to the server is closed as soon as all the response headers have been received.
Therefore, bandwidth and time isn’t wasted downloading the body which you don’t care about.
The response headers are downloaded always, even if they are not part of the output

## Raw request body

In addition to crafting structured [JSON](#json) and [forms](#forms) requests with the [request items](#request-items) syntax, you can provide a raw request body that will be sent without further processing.
These two approaches for specifying request data (i.e., structured and raw) cannot be combined.

There are three methods for passing raw request data: piping via `stdin`,
`--raw='data'`, and `@/file/path`.

### Redirected Input

The universal method for passing request data is through redirected `stdin`
(standard input)—piping.

By default, `stdin` data is buffered and then with no further processing used as the request body.
If you provide `Content-Length`, then the request body is streamed without buffering.
You may also use `--chunked` to enable streaming via [chunked transfer encoding](#chunked-transfer-encoding)
or `--compress, -x` to [compress the request body](#compressed-request-body).

There are multiple useful ways to use piping:

Redirect from a file:

```bash
$ http PUT pie.dev/put X-API-Token:123 < files/data.json
```

Or the output of another program:

```bash
$ grep '401 Unauthorized' /var/log/httpd/error_log | http POST pie.dev/post
```

You can use `echo` for simple data:

```bash
$ echo -n '{"name": "John"}' | http PATCH pie.dev/patch X-API-Token:123
```

You can also use a Bash *here string*:

```bash
$ http pie.dev/post <<<'{"name": "John"}'
```

You can even pipe web services together using HTTPie:

```bash
$ http GET https://api.github.com/repos/httpie/cli | http POST pie.dev/post
```

You can use `cat` to enter multiline data on the terminal:

```bash
$ cat | http POST pie.dev/post
<paste>
^D
```

```bash
$ cat | http POST pie.dev/post Content-Type:text/plain
- buy milk
- call parents
^D
```

On macOS, you can send the contents of the clipboard with `pbpaste`:

```bash
$ pbpaste | http PUT pie.dev/put
```

Passing data through `stdin` **can’t** be combined with data fields specified on the command line:

```bash
$ echo -n 'data' | http POST example.org more=data  # This is invalid
```

To prevent HTTPie from reading `stdin` data you can use the `--ignore-stdin` option.

### Request data via `--raw`

In a situation when piping data via `stdin` is not convenient (for example,
when generating API docs examples), you can specify the raw request body via
the `--raw` option.

```bash
$ http --raw 'Hello, world!' pie.dev/post
```

```bash
$ http --raw '{"name": "John"}' pie.dev/post
```

### Request data from a filename

An alternative to redirected `stdin` is specifying a filename (as `@/path/to/file`) whose content is used as if it came from `stdin`.

It has the advantage that the `Content-Type` header is automatically set to the appropriate value based on the filename extension.
For example, the following request sends the verbatim contents of that XML file with `Content-Type: application/xml`:

```bash
$ http PUT pie.dev/put @files/data.xml
```

File uploads are always streamed to avoid memory issues with large files.

## Chunked transfer encoding

You can use the `--chunked` flag to instruct HTTPie to use `Transfer-Encoding: chunked`:

```bash
$ http --chunked PUT pie.dev/put hello=world
```

```bash
$ http --chunked --multipart PUT pie.dev/put hello=world foo@files/data.xml
```

```bash
$ http --chunked pie.dev/post @files/data.xml
```

```bash
$ cat files/data.xml | http --chunked pie.dev/post
```

## Compressed request body

You can use the `--compress, -x` flag to instruct HTTPie to use `Content-Encoding: deflate` and compress the request data:

```bash
$ http --compress pie.dev/post @files/data.xml
```

```bash
$ cat files/data.xml | http --compress pie.dev/post
```

If compressing the data does not save size, HTTPie sends it untouched. To always compress the data, specify `--compress, -x` twice:

```bash
$ http -xx PUT pie.dev/put hello=world
```

## Terminal output

HTTPie does several things by default in order to make its terminal output easy to read.

### Colors and formatting

Syntax highlighting is applied to HTTP headers and bodies (where it makes sense).
You can choose your preferred color scheme via the `--style` option if you don’t like the default one.
There are dozens of styles available, here are just a few notable ones:

|       Style | Description                                                                                                                                                                                                                                                 |
|------------:|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
|      `auto` | Follows your terminal ANSI color styles. This is the default style used by HTTPie                                                                                                                                                                           |
|   `default` | Default styles of the underlying Pygments library. Not actually used by default by HTTPie. You can enable it with `--style=default`                                                                                                                         |
|  `pie-dark` | HTTPie’s original brand style. Also used in [HTTPie for Web and Desktop](https://httpie.io/product).                                                                                                                                                        |
| `pie-light` | Like `pie-dark`, but for terminals with light background colors.                                                                                                                                                                                            |
|       `pie` | A generic version of `pie-dark` and `pie-light` themes that can work with any terminal background. Its universality requires compromises in terms of legibility, but it’s useful if you frequently switch your terminal between dark and light backgrounds. |
|   `monokai` | A popular color scheme. Enable with `--style=monokai`                                                                                                                                                                                                       |
|    `fruity` | A bold, colorful scheme. Enable with `--style=fruity`                                                                                                                                                                                                       |
|           … | See `$ http --help` for all the possible `--style` values                                                                                                                                                                                                   |

Use one of these options to control output processing:

|            Option | Description                                                   |
|------------------:|---------------------------------------------------------------|
|    `--pretty=all` | Apply both colors and formatting. Default for terminal output |
| `--pretty=colors` | Apply colors                                                  |
| `--pretty=format` | Apply formatting                                              |
|   `--pretty=none` | Disables output processing. Default for redirected output     |

HTTPie looks at `Content-Type` to select the right syntax highlighter and formatter for each message body. If that fails (e.g., the server provides the wrong type), or you prefer a different treatment, you can manually overwrite the mime type for a response with `--response-mime`:

```bash
$ http --response-mime=text/yaml pie.dev/get
```

Formatting has the following effects:

- HTTP headers are sorted by name.
- JSON data is indented, sorted by keys, and unicode escapes are converted
  to the characters they represent.
- XML and XHTML data is indented.

Please note that sometimes there might be changes made by formatters on the actual response body (e.g.,
collapsing empty tags on XML) but the end result will always be semantically indistinguishable. Some of
these formatting changes can be configured more granularly through [format options](#format-options).

### Format options

The `--format-options=opt1:value,opt2:value` option allows you to control how the output should be formatted
when formatting is applied. The following options are available:

|           Option | Default value | Shortcuts                |
|-----------------:|:-------------:|--------------------------|
|   `headers.sort` |    `true`     | `--sorted`, `--unsorted` |
|    `json.format` |    `true`     | N/A                      |
|    `json.indent` |      `4`      | N/A                      |
| `json.sort_keys` |    `true`     | `--sorted`, `--unsorted` |
|     `xml.format` |    `true`     | N/A                      |
|     `xml.indent` |      `2`      | N/A                      |

For example, this is how you would disable the default header and JSON key
sorting, and specify a custom JSON indent size:

```bash
$ http --format-options headers.sort:false,json.sort_keys:false,json.indent:2 pie.dev/get
```

There are also two shortcuts that allow you to quickly disable and re-enable
sorting-related format options (currently it means JSON keys and headers):
`--unsorted` and `--sorted`.

This is something you will typically store as one of the default options in your [config](#config) file.

### Redirected output

HTTPie uses a different set of defaults for redirected output than for [terminal output](#terminal-output).
The differences being:

- Formatting and colors aren’t applied (unless `--pretty` is specified).
- Only the response body is printed (unless one of the [output options](#output-options) is set).
- Also, binary data isn’t suppressed.

The reason is to make piping HTTPie’s output to another programs and downloading files work with no extra flags.
Most of the time, only the raw response body is of an interest when the output is redirected.

Download a file:

```bash
$ http pie.dev/image/png > image.png
```

Download an image of an [Octocat](https://octodex.github.com/images/original.jpg), resize it using [ImageMagick](https://imagemagick.org/), and upload it elsewhere:

```bash
$ http octodex.github.com/images/original.jpg | convert - -resize 25% - | http example.org/Octocats
```

Force colorizing and formatting, and show both the request and the response in `less` pager:

```bash
$ http --pretty=all --verbose pie.dev/get | less -R
```

The `-R` flag tells `less` to interpret color escape sequences included HTTPie’s output.

You can create a shortcut for invoking HTTPie with colorized and paged output by adding the following to your `~/.bash_profile`:

```bash
function httpless {
    # `httpless example.org'
    http --pretty=all --print=hb "$@" | less -R;
}
```

### Binary data

Binary data is suppressed for terminal output, which makes it safe to perform requests to URLs that send back binary data.
Binary data is also suppressed in redirected but prettified output.
The connection is closed as soon as we know that the response body is binary,

```bash
$ http pie.dev/bytes/2000
```

You will nearly instantly see something like this:

```http
HTTP/1.1 200 OK
Content-Type: application/octet-stream

+-----------------------------------------+
| NOTE: binary data not shown in terminal |
+-----------------------------------------+
```

### Display encoding

HTTPie tries to do its best to decode message bodies when printing them to the terminal correctly. It uses the encoding specified in the `Content-Type` `charset` attribute. If a message doesn’t define its charset, we auto-detect it. For very short messages (1–32B), where auto-detection would be unreliable, we default to UTF-8. For cases when the response encoding is still incorrect, you can manually overwrite the response charset with `--response-charset`:

```bash
$ http --response-charset=big5 pie.dev/get
```

## Download mode

HTTPie features a download mode in which it acts similarly to `wget`.

When enabled using the `--download, -d` flag, response headers are printed to the terminal (`stderr`), and a progress bar is shown while the response body is being saved to a file.

```bash
$ http --download https://github.com/httpie/cli/archive/master.tar.gz
```

```http
HTTP/1.1 200 OK
Content-Disposition: attachment; filename=httpie-master.tar.gz
Content-Length: 257336
Content-Type: application/x-gzip

Downloading 251.30 kB to "httpie-master.tar.gz"
Done. 251.30 kB in 2.73862s (91.76 kB/s)
```

### Downloaded filename

There are three mutually exclusive ways through which HTTPie determines
the output filename (with decreasing priority):

1. You can explicitly provide it via `--output, -o`. The file gets overwritten if it already exists (or appended to with `--continue, -c`).
2. The server may specify the filename in the optional `Content-Disposition` response header. Any leading dots are stripped from a server-provided filename.
3. The last resort HTTPie uses is to generate the filename from a combination of the request URL and the response `Content-Type`. The initial URL is always used as the basis for the generated filename — even if there has been one or more redirects.

To prevent data loss by overwriting, HTTPie adds a unique numerical suffix to the filename when necessary (unless specified with `--output, -o`).

### Piping while downloading

You can also redirect the response body to another program while the response headers and progress are still shown in the terminal:

```bash
$ http -d https://github.com/httpie/cli/archive/master.tar.gz | tar zxf -
```

### Resuming downloads

If `--output, -o` is specified, you can resume a partial download using the `--continue, -c` option.
This only works with servers that support `Range` requests and `206 Partial Content` responses.
If the server doesn’t support that, the whole file will simply be downloaded:

```bash
$ http -dco file.zip example.org/file
```

`-dco` is shorthand for `--download` `--continue` `--output`.

### Other notes

- The `--download` option only changes how the response body is treated.
- You can still set custom headers, use sessions, `--verbose, -v`, etc.
- `--download` always implies `--follow` (redirects are followed).
- `--download` also implies `--check-status` (error HTTP status will result in a non-zero exist static code).
- HTTPie exits with status code `1` (error) if the body hasn’t been fully downloaded.
- `Accept-Encoding` can’t be set with `--download`.

## Streamed responses

Responses are downloaded and printed in chunks.
This allows for streaming and large file downloads without using too much memory.
However, when [colors and formatting](#colors-and-formatting) are applied, the whole response is buffered and only then processed at once.

### Disabling buffering

You can use the `--stream, -S` flag to make two things happen:

1. The output is flushed in much smaller chunks without any buffering, which makes HTTPie behave kind of like `tail -f` for URLs.
2. Streaming becomes enabled even when the output is prettified: It will be applied to each line of the response and flushed immediately. This makes it possible to have a nice output for long-lived requests, such as one to the [Twitter streaming API](https://developer.twitter.com/en/docs/tutorials/consuming-streaming-data).

The `--stream` option is automatically enabled when the response headers include `Content-Type: text/event-stream`.

### Example use cases

Prettified streamed response:

```bash
$ http --stream pie.dev/stream/3
```

Streamed output by small chunks à la `tail -f`:

```bash
# Send each new line (JSON object) to another URL as soon as it arrives from a streaming API:
$ http --stream pie.dev/stream/3 | while read line; do echo "$line" | http pie.dev/post ; done
```

## Sessions

By default, every request HTTPie makes is completely independent of any previous ones to the same host.

However, HTTPie also supports persistent sessions via the `--session=SESSION_NAME_OR_PATH` option.
In a session, custom [HTTP headers](#http-headers) (except for the ones starting with `Content-` or `If-`), [authentication](#authentication), and [cookies](#cookies) (manually specified or sent by the server) persist between requests to the same host.

```bash
# Create a new session:
$ http --session=./session.json pie.dev/headers API-Token:123
```

```bash
# Inspect / edit the generated session file:
$ cat session.json
```

```bash
# Re-use the existing session — the API-Token header will be set:
$ http --session=./session.json pie.dev/headers
```

All session data, including credentials, prompted passwords, cookie data, and custom headers are stored in plain text.
That means session files can also be created and edited manually in a text editor—they are regular JSON.
It also means that they can be read by anyone who has access to the session file.

### Named sessions

You can create one or more named session per host. For example, this is how you can create a new session named `user1` for `pie.dev`:

```bash
$ http --session=user1 -a user1:password pie.dev/get X-Foo:Bar
```

From now on, you can refer to the session by its name (`user1`).
When you choose to use the session again, all previously specified authentication or HTTP headers will automatically be set:

```bash
$ http --session=user1 pie.dev/get
```

To create or reuse a different session, simply specify a different name:

```bash
$ http --session=user2 -a user2:password pie.dev/get X-Bar:Foo
```

Named sessions’ data is stored in JSON files inside the `sessions` subdirectory of the [config](#config) directory, typically `~/.config/httpie/sessions/<host>/<name>.json` (`%APPDATA%\httpie\sessions\<host>\<name>.json` on Windows).

If you have executed the above commands on a Unix machine, you should be able to list the generated sessions files using:

```bash
$ ls -l ~/.config/httpie/sessions/pie.dev
```

### Anonymous sessions

Instead of giving it a name, you can also directly specify a path to a session file.
This allows for sessions to be re-used across multiple hosts:

```bash
# Create a session:
$ http --session=/tmp/session.json example.org
```

```bash
# Use the session to make a request to another host:
$ http --session=/tmp/session.json admin.example.org
```

```bash
# You can also refer to a previously created named session:
$ http --session=~/.config/httpie/sessions/another.example.org/test.json example.org
```

When creating anonymous sessions, please remember to always include at least one `/`, even if the session files is located in the current directory (i.e. `--session=./session.json` instead of just `--session=session.json`), otherwise HTTPie assumes a named session instead.

### Readonly session

To use the original session file without updating it from the request/response exchange after it has been created, specify the session name via `--session-read-only=SESSION_NAME_OR_PATH` instead.

```bash
# If the session file doesn’t exist, then it is created:
$ http --session-read-only=./ro-session.json pie.dev/headers Custom-Header:orig-value
```

```bash
# But it is not updated:
$ http --session-read-only=./ro-session.json pie.dev/headers Custom-Header:new-value
```

### Host-based cookie policy

Cookies persisted in sessions files have a `domain` field. This _binds_ them to a specified hostname. For example:

```json
{
    "cookies": [
        {
            "domain": "pie.dev",
            "name": "pie",
            "value": "apple"
        },
        {
            "domain": "httpbin.org",
            "name": "bin",
            "value": "http"
        }
    ]
}
```

Using this session file, we include `Cookie: pie=apple` only in requests against `pie.dev` and subdomains (e.g., `foo.pie.dev` or `foo.bar.pie.dev`):

```bash
$ http --session=./session.json pie.dev/cookies
```

```json
{
    "cookies": {
        "pie": "apple"
    }
}
```

To make a cookie domain _unbound_ (i.e., to make it available to all hosts, including throughout a cross-domain redirect chain), you can set the `domain` field to `null` in the session file:

```json
{
    "cookies": [
        {
            "domain": null,
            "name": "unbound-cookie",
            "value": "send-me-to-any-host"
        }
    ]
}
```

```bash
$ http --session=./session.json pie.dev/cookies
```

```json
{
    "cookies": {
        "unbound-cookie": "send-me-to-any-host"
    }
}
```


### Cookie storage behavior

There are three possible sources of persisted cookies within a session. They have the following storage priority: 1—response; 2—command line; 3—session file.

1. Receive a response with a `Set-Cookie` header:

    ```bash
    $ http --session=./session.json pie.dev/cookie/set?foo=bar
    ```

2. Send a cookie specified on the command line as seen in [cookies](#cookies):

    ```bash
    $ http --session=./session.json pie.dev/headers Cookie:foo=bar
    ```

3. Manually set cookie parameters in the session file:

    ```json
    {
       "cookies": {
           "foo": {
               "expires": null,
               "path": "/",
               "secure": false,
               "value": "bar"
               }
       }
    }
    ```

In summary:

- Cookies set via the CLI overwrite cookies of the same name inside session files.
- Server-sent `Set-Cookie` header cookies overwrite any pre-existing ones with the same name.

Cookie expiration handling:

- When the server expires an existing cookie, HTTPie removes it from the session file.
- When a cookie in a session file expires, HTTPie removes it before sending a new request.

### Upgrading sessions

HTTPie may introduce changes in the session file format.  When HTTPie detects an obsolete format, it shows a warning. You can upgrade your session files using the following commands:

Upgrade all existing [named sessions](#named-sessions) inside the `sessions` subfolder of your [config directory](https://httpie.io/docs/cli/config-file-directory):

```bash
$ httpie cli sessions upgrade-all
Upgraded 'api_auth' @ 'pie.dev' to v3.1.0
Upgraded 'login_cookies' @ 'httpie.io' to v3.1.0
```

Upgrading individual sessions requires you to specify the session's hostname. That allows HTTPie to find the correct file in the case of name sessions. Additionally, it allows it to correctly bind cookies when upgrading with [`--bind-cookies`](#session-upgrade-options).

Upgrade a single [named session](#named-sessions):

```bash
$ httpie cli sessions upgrade pie.dev api_auth
Upgraded 'api_auth' @ 'pie.dev' to v3.1.0
```

Upgrade a single [anonymous session](#anonymous-sessions) using a file path:

```bash
$ httpie cli sessions upgrade pie.dev ./session.json
Upgraded 'session.json' @ 'pie.dev' to v3.1.0
```

#### Session upgrade options

These flags are available for both `sessions upgrade` and `sessions upgrade-all`:

| Option           | Description                                                                                                                                                                   |
|------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `--bind-cookies` | Bind all previously [unbound cookies](#host-based-cookie-policy) to the session’s host ([context](https://github.com/httpie/cli/security/advisories/GHSA-9w4w-cpc8-h2fq)). |


## Config

HTTPie uses a simple `config.json` file.
The file doesn’t exist by default, but you can create it manually.

### Config file directory

To see the exact location for your installation, run `http --debug` and look for `config_dir` in the output.

The default location of the configuration file on most platforms is `$XDG_CONFIG_HOME/httpie/config.json` (defaulting to `~/.config/httpie/config.json`).

For backward compatibility, if the directory `~/.httpie` exists, the configuration file there will be used instead.

On Windows, the config file is located at `%APPDATA%\httpie\config.json`.

The config directory can be changed by setting the `$HTTPIE_CONFIG_DIR` environment variable:

```bash
$ export HTTPIE_CONFIG_DIR=/tmp/httpie
$ http pie.dev/get
```

### Configurable options

Currently, HTTPie offers a single configurable option:

#### `default_options`

An `Array` (by default empty) of default options that should be applied to every invocation of HTTPie.

For instance, you can use this config option to change your default color theme:

```bash
$ cat ~/.config/httpie/config.json
```

```json
{
    "default_options": [
        "--style=fruity"
    ]
}
```

Technically, it is possible to include any HTTPie options in there.
However, it is not recommended modifying the default behavior in a way that would break your compatibility with the wider world as that may become confusing.

#### `plugins_dir`

The directory where the plugins will be installed. HTTPie needs to have read/write access on that directory, since
`httpie cli plugins install` will download new plugins to there. See [plugin manager](#plugin-manager) for more information.

### Un-setting previously specified options

Default options from the config file, or specified any other way, can be unset for a particular invocation via `--no-OPTION` arguments passed via the command line (e.g., `--no-style` or `--no-session`).

## Scripting

When using HTTPie from shell scripts, it can be handy to set the `--check-status` flag.
It instructs HTTPie to exit with an error if the HTTP status is one of `3xx`, `4xx`, or `5xx`.
The exit status will be `3` (unless `--follow` is set), `4`, or `5`, respectively.

```bash
#!/bin/bash

if http --check-status --ignore-stdin --timeout=2.5 HEAD pie.dev/get &> /dev/null; then
    echo 'OK!'
else
    case $? in
        2) echo 'Request timed out!' ;;
        3) echo 'Unexpected HTTP 3xx Redirection!' ;;
        4) echo 'HTTP 4xx Client Error!' ;;
        5) echo 'HTTP 5xx Server Error!' ;;
        6) echo 'Exceeded --max-redirects=<n> redirects!' ;;
        *) echo 'Other Error!' ;;
    esac
fi
```

### Best practices

The default behavior of automatically reading `stdin` is typically not desirable during non-interactive invocations.
You most likely want to use the `--ignore-stdin` option to disable it.

It's important to note that without the `--ignore-stdin` option, HTTPie may appear to have stopped working (hang). This happens because, in situations where HTTPie is invoked outside of an interactive session, such as from a cron job, `stdin` is not connected to a terminal. This means that the rules for [redirected input](#redirected-input) will be followed. When `stdin` is redirected, HTTPie assumes that the input will contain the request body, and it waits for the input to be provided. But, since there is neither any input data nor an end-of-file (`EOF`) signal, HTTPie gets stuck. To avoid this problem, the `--ignore-stdin` flag should be used in scripts, unless data is being piped to HTTPie.

To prevent your program from becoming unresponsive when the server fails to respond, it's a good idea to use the `--timeout` option to set a connection timeout limit.

## Plugin manager

HTTPie offers extensibility through a [plugin API](https://github.com/httpie/cli/blob/master/httpie/plugins/base.py),
and there are dozens of plugins available to try!
They add things like new authentication methods ([akamai/httpie-edgegrid](https://github.com/akamai/httpie-edgegrid)),
transport mechanisms ([httpie/httpie-unixsocket](https://github.com/httpie/httpie-unixsocket)),
message convertors ([banteg/httpie-image](https://github.com/banteg/httpie-image)), or simply
change how a response is formatted.

> Note: Plugins are usually made by our community members, and thus have no direct relationship with
> the HTTPie project. We do not control / review them at the moment, so use them at your own discretion.

For managing these plugins; starting with 3.0, we are offering a new plugin manager.

This command is currently in beta.

### `httpie cli`

#### `httpie cli check-updates`

You can check whether a new update is available for your system by running `httpie cli check-updates`:

```bash-termible
$ httpie cli check-updates
```

#### `httpie cli export-args`

`httpie cli export-args` command can expose the parser specification of `http`/`https` commands
(like an API definition) to outside tools so that they can use this to build better interactions
over them (e.g., offer auto-complete).

Available formats to export in include:

| Format | Description                                                                                                                                       |
|--------|---------------------------------------------------------------------------------------------------------------------------------------------------|
| `json` | Export the parser spec in JSON. The schema includes a top-level `version` parameter which should be interpreted in [semver](https://semver.org/). |

You can use any of these formats with `--format` parameter, but the default one is `json`.

```bash
$ httpie cli export-args | jq '"Program: " + .spec.name + ", Version: " +  .version'
"Program: http, Version: 0.0.1a0"
```

#### `httpie cli plugins`

`plugins` interface is a very simple plugin manager for installing, listing and uninstalling HTTPie plugins.

In the past `pip` was used to install/uninstall plugins, but on some environments (e.g., brew installed
packages) it wasn’t working properly. The new interface is a very simple overlay on top of `pip` to allow
plugin installations on every installation method.

By default, the plugins (and their missing dependencies) will be stored under the configuration directory,
but this can be modified through `plugins_dir` variable on the config.

##### `httpie cli plugins install`

For installing plugins from [PyPI](https://pypi.org/) or from local paths, `httpie cli plugins install`
can be used.

```bash
$ httpie cli plugins install httpie-plugin
Installing httpie-plugin...
Successfully installed httpie-plugin-1.0.2
```

> Tip: Generally HTTPie plugins start with `httpie-` prefix. Try searching for it on [PyPI](https://pypi.org/search/?q=httpie-)
> to find out all plugins from the community.

##### `httpie cli plugins list`

List all installed plugins.

```bash
$ httpie cli plugins list
httpie_plugin (1.0.2)
  httpie_plugin (httpie.plugins.auth.v1)
httpie_plugin_2 (1.0.6)
  httpie_plugin_2 (httpie.plugins.auth.v1)
httpie_converter (1.0.0)
  httpie_iterm_converter (httpie.plugins.converter.v1)
  httpie_konsole_konverter (httpie.plugins.converter.v1)
```

##### `httpie cli plugins upgrade`

For upgrading already installed plugins, use `httpie plugins upgrade`.

```bash
$ httpie cli plugins upgrade httpie-plugin
```

##### `httpie cli plugins uninstall`

Uninstall plugins from the isolated plugins directory. If the plugin is not installed
through `httpie cli plugins install`, it won’t uninstall it.

```bash
$ httpie cli plugins uninstall httpie-plugin
```

## Meta

### Interface design

The syntax of the command arguments closely correspond to the actual HTTP requests sent over the wire.
It has the advantage that it’s easy to remember and read.
You can often translate an HTTP request to an HTTPie argument list just by inlining the request elements.
For example, compare this HTTP request:

```http
POST /post HTTP/1.1
Host: pie.dev
X-API-Key: 123
User-Agent: Bacon/1.0
Content-Type: application/x-www-form-urlencoded

name=value&name2=value2
```

with the HTTPie command that sends it:

```bash
$ http -f POST pie.dev/post \
    X-API-Key:123 \
    User-Agent:Bacon/1.0 \
    name=value \
    name2=value2
```

Notice that both the order of elements and the syntax are very similar, and that only a small portion of the command is used to control HTTPie and doesn’t directly correspond to any part of the request (here, it’s only `-f` asking HTTPie to send a form request).

The two modes, `--pretty=all` (default for terminal) and `--pretty=none` (default for [redirected output](#redirected-output)), allow for both user-friendly interactive use and usage from scripts, where HTTPie serves as a generic HTTP client.

In the future, the command line syntax and some of the `--OPTIONS` may change slightly, as HTTPie improves and new features are added.
All changes are recorded in the [change log](#change-log).

### Community and Support

HTTPie has the following community channels:

- [GitHub Issues](https://github.com/httpie/cli/issues) for bug reports and feature requests
- [Discord server](https://httpie.io/discord) to ask questions, discuss features, and for general API development discussion
- [StackOverflow](https://stackoverflow.com) to ask questions (make sure to use the [httpie](https://stackoverflow.com/questions/tagged/httpie) tag)

### Related projects

#### Dependencies

Under the hood, HTTPie uses these two amazing libraries:

- [Requests](https://requests.readthedocs.io/en/latest/) — Python HTTP library for humans
- [Pygments](https://pygments.org/) — Python syntax highlighter

#### HTTPie friends

HTTPie plays exceptionally well with the following tools:

- [http-prompt](https://github.com/httpie/http-prompt) — an interactive shell for HTTPie featuring autocomplete and command syntax highlighting
- [jq](https://stedolan.github.io/jq/) — CLI JSON processor that works great in conjunction with HTTPie

Helpers to convert from other client tools:

- [CurliPie](https://curlipie.open-api.vn) — library to convert cURL commands to HTTPie

#### Alternatives

- [httpcat](https://github.com/httpie/httpcat) — a lower-level sister utility of HTTPie for constructing raw HTTP requests on the command line
- [curl](https://curl.haxx.se) — a "Swiss knife" command line tool and an exceptional library for transferring data with URLs.

### Contributing

See [CONTRIBUTING](https://github.com/httpie/cli/blob/master/CONTRIBUTING.md).

### Security policy

See [github.com/httpie/cli/security/policy](https://github.com/httpie/cli/security/policy).

### Change log

See [CHANGELOG](https://github.com/httpie/cli/blob/master/CHANGELOG.md).

### Artwork

- [README Animation](https://github.com/httpie/cli/blob/master/docs/httpie-animation.gif) by [Allen Smith](https://github.com/loranallensmith).

### Licence

BSD-3-Clause: [LICENSE](https://github.com/httpie/cli/blob/master/LICENSE).

### Authors

[Jakub Roztocil](https://roztocil.co) ([@jakubroztocil](https://twitter.com/jakubroztocil)) created HTTPie and [these fine people](https://github.com/httpie/cli/blob/master/AUTHORS.md) have contributed.



================================================
FILE: docs/config.json
================================================
{
  "website": {
    "master_and_released_docs_differ_after": null
  }
}


================================================
FILE: docs/contributors/README.md
================================================
Here we maintain a database of contributors, from which we generate credits on release blog posts and social media.

For the HTTPie blog see: <https://httpie.io/blog>.


================================================
FILE: docs/contributors/fetch.py
================================================
"""
Generate the contributors database.

FIXME: replace `requests` calls with the HTTPie API, when available.
"""
import json
import os
import re
import sys
from copy import deepcopy
from datetime import datetime
from pathlib import Path
from subprocess import check_output
from time import sleep
from typing import Any, Dict, Optional, Set

import requests

FullNames = Set[str]
GitHubLogins = Set[str]
Person = Dict[str, str]
People = Dict[str, Person]
UserInfo = Dict[str, Any]

CO_AUTHORS = re.compile(r'Co-authored-by: ([^<]+) <').finditer
API_URL = 'https://api.github.com'
REPO = OWNER = 'httpie'
REPO_URL = f'{API_URL}/repos/{REPO}/{OWNER}'

HERE = Path(__file__).parent
DB_FILE = HERE / 'people.json'

DEFAULT_PERSON: Person = {'committed': [], 'reported': [], 'github': '', 'twitter': ''}
SKIPPED_LABELS = {'invalid'}

GITHUB_TOKEN = os.getenv('GITHUB_TOKEN')
assert GITHUB_TOKEN, 'GITHUB_TOKEN envar is missing'


class FinishedForNow(Exception):
    """Raised when remaining GitHub rate limit is zero."""


def main(previous_release: str, current_release: str) -> int:
    since = release_date(previous_release)
    until = release_date(current_release)

    contributors = load_awesome_people()
    try:
        committers = find_committers(since, until)
        reporters = find_reporters(since, until)
    except Exception as exc:
        # We want to save what we fetched so far. So pass.
        print(' !! ', exc)

    try:
        merge_all_the_people(current_release, contributors, committers, reporters)
        fetch_missing_users_details(contributors)
    except FinishedForNow:
        # We want to save what we fetched so far. So pass.
        print(' !! Committers:', committers)
        print(' !! Reporters:', reporters)
        exit_status = 1
    else:
        exit_status = 0

    save_awesome_people(contributors)
    return exit_status


def find_committers(since: str, until: str) -> FullNames:
    url = f'{REPO_URL}/commits'
    page = 1
    per_page = 100
    params = {
        'since': since,
        'until': until,
        'per_page': per_page,
    }
    committers: FullNames = set()

    while 'there are commits':
        params['page'] = page
        data = fetch(url, params=params)

        for item in data:
            commit = item['commit']
            committers.add(commit['author']['name'])
            debug(' >>> Commit', item['html_url'])
            for co_author in CO_AUTHORS(commit['message']):
                name = co_author.group(1)
                committers.add(name)

        if len(data) < per_page:
            break
        page += 1

    return committers


def find_reporters(since: str, until: str) -> GitHubLogins:
    url = f'{API_URL}/search/issues'
    page = 1
    per_page = 100
    params = {
        'q': f'repo:{REPO}/{OWNER} is:issue closed:{since}..{until}',
        'per_page': per_page,
    }
    reporters: GitHubLogins = set()

    while 'there are issues':
        params['page'] = page
        data = fetch(url, params=params)

        for item in data['items']:
            # Filter out unwanted labels.
            if any(label['name'] in SKIPPED_LABELS for label in item['labels']):
                continue
            debug(' >>> Issue', item['html_url'])
            reporters.add(item['user']['login'])

        if len(data['items']) < per_page:
            break
        page += 1

    return reporters


def merge_all_the_people(release: str, contributors: People, committers: FullNames, reporters: GitHubLogins) -> None:
    """
    >>> contributors = {'Alice': new_person(github='alice', twitter='alice')}
    >>> merge_all_the_people('2.6.0', contributors, {}, {})
    >>> contributors
    {'Alice': {'committed': [], 'reported': [], 'github': 'alice', 'twitter': 'alice'}}

    >>> contributors = {'Bob': new_person(github='bob', twitter='bob')}
    >>> merge_all_the_people('2.6.0', contributors, {'Bob'}, {'bob'})
    >>> contributors
    {'Bob': {'committed': ['2.6.0'], 'reported': ['2.6.0'], 'github': 'bob', 'twitter': 'bob'}}

    >>> contributors = {'Charlotte': new_person(github='charlotte', twitter='charlotte', committed=['2.5.0'], reported=['2.5.0'])}
    >>> merge_all_the_people('2.6.0', contributors, {'Charlotte'}, {'charlotte'})
    >>> contributors
    {'Charlotte': {'committed': ['2.5.0', '2.6.0'], 'reported': ['2.5.0', '2.6.0'], 'github': 'charlotte', 'twitter': 'charlotte'}}

    """
    # Update known contributors.
    for name, details in contributors.items():
        if name in committers:
            if release not in details['committed']:
                details['committed'].append(release)
            committers.remove(name)
        if details['github'] in reporters:
            if release not in details['reported']:
                details['reported'].append(release)
            reporters.remove(details['github'])

    # Add new committers.
    for name in committers:
        user_info = user(fullname=name)
        contributors[name] = new_person(
            github=user_info['login'],
            twitter=user_info['twitter_username'],
            committed=[release],
        )
        if user_info['login'] in reporters:
            contributors[name]['reported'].append(release)
            reporters.remove(user_info['login'])

    # Add new reporters.
    for github_username in reporters:
        user_info = user(github_username=github_username)
        contributors[user_info['name'] or user_info['login']] = new_person(
            github=github_username,
            twitter=user_info['twitter_username'],
            reported=[release],
        )


def release_date(release: str) -> str:
    date = check_output(['git', 'log', '-1', '--format=%ai', release], text=True).strip()
    return datetime.strptime(date, '%Y-%m-%d %H:%M:%S %z').isoformat()


def load_awesome_people() -> People:
    try:
        with DB_FILE.open(encoding='utf-8') as fh:
            return json.load(fh)
    except (FileNotFoundError, ValueError):
        return {}


def fetch(url: str, params: Optional[Dict[str, str]] = None) -> UserInfo:
    headers = {
        'Accept': 'application/vnd.github.v3+json',
        'Authentication': f'token {GITHUB_TOKEN}'
    }
    for retry in range(1, 6):
        debug(f'[{retry}/5]', f'{url = }', f'{params = }')
        with requests.get(url, params=params, headers=headers) as req:
            try:
                req.raise_for_status()
            except requests.exceptions.HTTPError as exc:
                if exc.response.status_code == 403:
                    # 403 Client Error: rate limit exceeded for url: ...
                    now = int(datetime.utcnow().timestamp())
                    xrate_limit_reset = int(exc.response.headers['X-RateLimit-Reset'])
                    wait = xrate_limit_reset - now
                    if wait > 20:
                        raise FinishedForNow()
                    debug(' !', 'Waiting', wait, 'seconds before another try ...')
                    sleep(wait)
                continue
            return req.json()
    assert ValueError('Rate limit exceeded')


def new_person(**kwargs: str) -> Person:
    data = deepcopy(DEFAULT_PERSON)
    data.update(**kwargs)
    return data


def user(fullname: Optional[str] = '', github_username: Optional[str] = '') -> UserInfo:
    if github_username:
        url = f'{API_URL}/users/{github_username}'
        return fetch(url)

    url = f'{API_URL}/search/users'
    for query in (f'fullname:{fullname}', f'user:{fullname}'):
        params = {
            'q': f'repo:{REPO}/{OWNER} {query}',
            'per_page': 1,
        }
        user_info = fetch(url, params=params)
        if user_info['items']:
            user_url = user_info['items'][0]['url']
            return fetch(user_url)


def fetch_missing_users_details(people: People) -> None:
    for name, details in people.items():
        if details['github'] and details['twitter']:
            continue
        user_info = user(github_username=details['github'], fullname=name)
        if not details['github']:
            details['github'] = user_info['login']
        if not details['twitter']:
            details['twitter'] = user_info['twitter_username']


def save_awesome_people(people: People) -> None:
    with DB_FILE.open(mode='w', encoding='utf-8') as fh:
        json.dump(people, fh, indent=4, sort_keys=True)
        fh.write("\n")


def debug(*args: Any) -> None:
    if os.getenv('DEBUG') == '1':
        print(*args)


if __name__ == '__main__':
    ret = 1
    try:
        ret = main(*sys.argv[1:])
    except TypeError:
        ret = 2
        print(f'''
Fetch contributors to a release.

Usage:
    python {sys.argv[0]} {sys.argv[0]} <RELEASE N-1> <RELEASE N>
Example:
    python {sys.argv[0]} 2.4.0 2.5.0

Define the DEBUG=1 environment variable to enable verbose output.
''')
    except KeyboardInterrupt:
        ret = 255
    sys.exit(ret)


================================================
FILE: docs/contributors/generate.py
================================================
"""
Generate snippets to copy-paste.
"""
import sys

from jinja2 import Template

from fetch import HERE, load_awesome_people

TPL_FILE = HERE / 'snippet.jinja2'

HTTPIE_TEAM = {
    'claudiatd',
    'jakubroztocil',
    'jkbr',
    'isidentical'
}

BOT_ACCOUNTS = {
    'dependabot-sr'
}

IGNORE_ACCOUNTS = HTTPIE_TEAM | BOT_ACCOUNTS


def generate_snippets(release: str) -> str:
    people = load_awesome_people()
    contributors = {
        name: details
        for name, details in people.items()
        if details['github'] not in IGNORE_ACCOUNTS
        and (release in details['committed'] or release in details['reported'])
    }

    template = Template(source=TPL_FILE.read_text(encoding='utf-8'))
    output = template.render(contributors=contributors, release=release)
    print(output)
    return 0


if __name__ == '__main__':
    ret = 1
    try:
        ret = generate_snippets(sys.argv[1])
    except (IndexError, TypeError):
        ret = 2
        print(f'''
Generate snippets for contributors to a release.

Usage:
    python {sys.argv[0]} {sys.argv[0]} <RELEASE>
''')
    sys.exit(ret)


================================================
FILE: docs/contributors/people.json
================================================
{
    "Aaron Miller": {
        "committed": [],
        "github": "aaronhmiller",
        "reported": [
            "3.0.0"
        ],
        "twitter": "aaronmiller8"
    },
    "Alexander Bogdanov": {
        "committed": [],
        "github": "ab-kily",
        "reported": [
            "3.0.0"
        ],
        "twitter": null
    },
    "Almad": {
        "committed": [
            "2.5.0"
        ],
        "github": "Almad",
        "reported": [
            "2.6.0",
            "3.0.0"
        ],
        "twitter": "almadcz"
    },
    "Andr\u00e1s Czig\u00e1ny": {
        "committed": [],
        "github": "andrascz",
        "reported": [
            "3.0.0"
        ],
        "twitter": null
    },
    "Annette Wilson": {
        "committed": [],
        "github": "annettejanewilson",
        "reported": [
            "2.6.0",
            "3.0.0"
        ],
        "twitter": null
    },
    "Anton Emelyanov": {
        "committed": [
            "2.5.0"
        ],
        "github": "king-menin",
        "reported": [],
        "twitter": null
    },
    "Batuhan Taskaya": {
        "committed": [
            "3.0.0",
            "3.2.0"
        ],
        "github": "isidentical",
        "reported": [
            "3.0.0",
            "3.2.0"
        ],
        "twitter": "isidentical"
    },
    "Brad Crittenden": {
        "committed": [],
        "github": "bac",
        "reported": [
            "3.0.0"
        ],
        "twitter": null
    },
    "Chad": {
        "committed": [],
        "github": "cythrawll",
        "reported": [
            "3.0.0"
        ],
        "twitter": null
    },
    "D8ger": {
        "committed": [],
        "github": "caofanCPU",
        "reported": [
            "2.5.0"
        ],
        "twitter": null
    },
    "Dave": {
        "committed": [
            "2.6.0",
            "3.0.0"
        ],
        "github": "davecheney",
        "reported": [],
        "twitter": "davecheney"
    },
    "Dawid Ferenczy Rogo\u017ean": {
        "committed": [],
        "github": "ferenczy",
        "reported": [
            "2.5.0"
        ],
        "twitter": "DawidFerenczy"
    },
    "Ed Rooth": {
        "committed": [],
        "github": "sym3tri",
        "reported": [
            "3.0.0"
        ],
        "twitter": null
    },
    "Elena Lape": {
        "committed": [
            "2.5.0"
        ],
        "github": "elenalape",
        "reported": [],
        "twitter": "elena_lape"
    },
    "Ethan Mills": {
        "committed": [
            "3.2.0"
        ],
        "github": "ethanmills",
        "reported": [],
        "twitter": null
    },
    "Fabio Peruzzo": {
        "committed": [],
        "github": "peruzzof",
        "reported": [
            "2.6.0",
            "3.0.0"
        ],
        "twitter": null
    },
    "F\u00fash\u0113ng": {
        "committed": [],
        "github": "lienide",
        "reported": [
            "2.5.0"
        ],
        "twitter": null
    },
    "Gabriel Cruz": {
        "committed": [],
        "github": "gmelodie",
        "reported": [
            "3.0.0"
        ],
        "twitter": "gmelodiecruz"
    },
    "Gaurav": {
        "committed": [
            "3.0.0"
        ],
        "github": "gkcs",
        "reported": [],
        "twitter": null
    },
    "Giampaolo Rodola": {
        "committed": [],
        "github": "giampaolo",
        "reported": [
            "2.5.0"
        ],
        "twitter": null
    },
    "Greg Myers": {
        "committed": [
            "3.0.0"
        ],
        "github": "myersg86",
        "reported": [],
        "twitter": null
    },
    "Hugh Williams": {
        "committed": [],
        "github": "hughpv",
        "reported": [
            "2.5.0"
        ],
        "twitter": null
    },
    "Ilya Sukhanov": {
        "committed": [
            "2.5.0"
        ],
        "github": "IlyaSukhanov",
        "reported": [
            "2.5.0"
        ],
        "twitter": null
    },
    "Jakub Roztocil": {
        "committed": [
            "2.5.0",
            "2.6.0",
            "3.0.0",
            "3.2.0"
        ],
        "github": "jakubroztocil",
        "reported": [
            "2.5.0",
            "2.6.0",
            "3.0.0"
        ],
        "twitter": "jakubroztocil"
    },
    "Jan Bra\u0161na": {
        "committed": [
            "3.0.0"
        ],
        "github": "janbrasna",
        "reported": [],
        "twitter": "janbrasna"
    },
    "Jan Verbeek": {
        "committed": [
            "2.5.0"
        ],
        "github": "blyxxyz",
        "reported": [
            "3.0.0",
            "3.2.0"
        ],
        "twitter": null
    },
    "Jannik Vieten": {
        "committed": [
            "2.5.0"
        ],
        "github": "exploide",
        "reported": [],
        "twitter": null
    },
    "Jesper Holmberg": {
        "committed": [],
        "github": "strindberg",
        "reported": [
            "3.0.0"
        ],
        "twitter": null
    },
    "Kirill Krasnov": {
        "committed": [],
        "github": "Kirill",
        "reported": [
            "3.0.0"
        ],
        "twitter": null
    },
    "Marcel St\u00f6r": {
        "committed": [
            "2.5.0"
        ],
        "github": "marcelstoer",
        "reported": [],
        "twitter": "frightanic"
    },
    "Marco Seguri": {
        "committed": [],
        "github": "seguri",
        "reported": [
            "3.0.0"
        ],
        "twitter": null
    },
    "Mariano Ruiz": {
        "committed": [],
        "github": "mrsarm",
        "reported": [
            "2.5.0"
        ],
        "twitter": "mrsarm82"
    },
    "Mark Rosenbaum": {
        "committed": [],
        "github": "markrosenbaum",
        "reported": [
            "3.0.0"
        ],
        "twitter": null
    },
    "Micka\u00ebl Schoentgen": {
        "committed": [
            "2.5.0",
            "2.6.0",
            "3.0.0"
        ],
        "github": "BoboTiG",
        "reported": [
            "2.5.0",
            "2.6.0",
            "3.0.0"
        ],
        "twitter": "__tiger222__"
    },
    "Mike DePalatis": {
        "committed": [],
        "github": "mivade",
        "reported": [
            "3.0.0"
        ],
        "twitter": null
    },
    "Miro Hron\u010dok": {
        "committed": [
            "2.5.0",
            "2.6.0",
            "3.0.0"
        ],
        "github": "hroncok",
        "reported": [],
        "twitter": "hroncok"
    },
    "Mohamed Daahir": {
        "committed": [],
        "github": "ducaale",
        "reported": [
            "2.5.0",
            "3.2.0"
        ],
        "twitter": null
    },
    "Nanashi.": {
        "committed": [],
        "github": "sevenc-nanashi",
        "reported": [
            "3.0.0"
        ],
        "twitter": "sevenc_nanashi"
    },
    "Nicklas Ansman Giertz": {
        "committed": [],
        "github": "ansman",
        "reported": [
            "3.2.0"
        ],
        "twitter": null
    },
    "Oliver Fish": {
        "committed": [],
        "github": "Oliver-Fish",
        "reported": [
            "3.2.0"
        ],
        "twitter": null
    },
    "Omer Akram": {
        "committed": [
            "2.6.0",
            "3.0.0"
        ],
        "github": "om26er",
        "reported": [
            "2.6.0",
            "3.0.0"
        ],
        "twitter": "om26er"
    },
    "Patrick Taylor": {
        "committed": [],
        "github": "pmeister",
        "reported": [
            "3.0.0"
        ],
        "twitter": null
    },
    "Paul Laffitte": {
        "committed": [],
        "github": "paullaffitte",
        "reported": [
            "3.0.0"
        ],
        "twitter": "plaffitt"
    },
    "Pavel Alexeev aka Pahan-Hubbitus": {
        "committed": [],
        "github": "Hubbitus",
        "reported": [
            "2.5.0"
        ],
        "twitter": null
    },
    "Roberto L\u00f3pez L\u00f3pez": {
        "committed": [],
        "github": "robertolopezlopez",
        "reported": [
            "3.2.0"
        ],
        "twitter": null
    },
    "Russell Shurts": {
        "committed": [],
        "github": "rshurts",
        "reported": [
            "3.0.0"
        ],
        "twitter": null
    },
    "Samuel Marks": {
        "committed": [],
        "github": "SamuelMarks",
        "reported": [
            "2.5.0"
        ],
        "twitter": null
    },
    "Sebastian Czech": {
        "committed": [
            "3.0.0"
        ],
        "github": "sebastianczech",
        "reported": [],
        "twitter": "sebaczech"
    },
    "Sullivan SENECHAL": {
        "committed": [],
        "github": "soullivaneuh",
        "reported": [
            "2.5.0"
        ],
        "twitter": null
    },
    "Thomas Klinger": {
        "committed": [],
        "github": "mosesontheweb",
        "reported": [
            "2.5.0"
        ],
        "twitter": null
    },
    "Vincent van \u2019t Zand": {
        "committed": [],
        "github": "vovtz",
        "reported": [
            "2.6.0",
            "3.0.0"
        ],
        "twitter": null
    },
    "Vivaan Verma": {
        "committed": [
            "3.0.0"
        ],
        "github": "doublevcodes",
        "reported": [],
        "twitter": "doublevcodes"
    },
    "Vladimir Berkutov": {
        "committed": [
            "3.0.0"
        ],
        "github": "dair-targ",
        "reported": [],
        "twitter": null
    },
    "Will Rogers": {
        "committed": [],
        "github": "wjrogers",
        "reported": [
            "3.0.0"
        ],
        "twitter": null
    },
    "Yannic Schneider": {
        "committed": [],
        "github": "cynay",
        "reported": [
            "2.5.0"
        ],
        "twitter": null
    },
    "a1346054": {
        "committed": [
            "2.5.0"
        ],
        "github": "a1346054",
        "reported": [],
        "twitter": null
    },
    "arloan": {
        "committed": [],
        "github": "arloan",
        "reported": [
            "3.0.0"
        ],
        "twitter": null
    },
    "bl-ue": {
        "committed": [
            "2.5.0"
        ],
        "github": "FiReBlUe45",
        "reported": [],
        "twitter": null
    },
    "blueray453": {
        "committed": [],
        "github": "blueray453",
        "reported": [
            "3.0.0"
        ],
        "twitter": null
    },
    "claudiatd": {
        "committed": [
            "2.6.0",
            "3.0.0"
        ],
        "github": "claudiatd",
        "reported": [],
        "twitter": null
    },
    "coldcoff": {
        "committed": [],
        "github": "coldcoff",
        "reported": [
            "3.0.0"
        ],
        "twitter": null
    },
    "dependabot[bot]": {
        "committed": [
            "3.2.0"
        ],
        "github": "dependabot-sr",
        "reported": [],
        "twitter": null
    },
    "dkreeft": {
        "committed": [
            "2.6.0",
            "3.0.0"
        ],
        "github": "dkreeft",
        "reported": [],
        "twitter": null
    },
    "greg": {
        "committed": [
            "3.0.0"
        ],
        "github": "gregkh",
        "reported": [],
        "twitter": null
    },
    "henryhu712": {
        "committed": [
            "2.5.0"
        ],
        "github": "henryhu712",
        "reported": [],
        "twitter": null
    },
    "hosseingt": {
        "committed": [
            "3.0.0"
        ],
        "github": "hosseingt",
        "reported": [],
        "twitter": null
    },
    "jakubroztocil": {
        "committed": [
            "2.6.0",
            "3.0.0"
        ],
        "github": "jkbr",
        "reported": [],
        "twitter": null
    },
    "josephworks": {
        "committed": [],
        "github": "josephworks",
        "reported": [
            "3.0.0"
        ],
        "twitter": null
    },
    "jungle-boogie": {
        "committed": [],
        "github": "jungle-boogie",
        "reported": [
            "2.5.0"
        ],
        "twitter": null
    },
    "luisuimi": {
        "committed": [],
        "github": "luisuimi",
        "reported": [
            "3.0.0"
        ],
        "twitter": null
    },
    "luzpaz": {
        "committed": [
            "3.2.0"
        ],
        "github": "luzpaz",
        "reported": [],
        "twitter": null
    },
    "nixbytes": {
        "committed": [
            "2.5.0"
        ],
        "github": "nixbytes",
        "reported": [],
        "twitter": "linuxbyte3"
    },
    "peterpt": {
        "committed": [],
        "github": "peterpt",
        "reported": [
            "3.0.0"
        ],
        "twitter": null
    },
    "qiulang": {
        "committed": [],
        "github": "qiulang",
        "reported": [
            "2.5.0"
        ],
        "twitter": null
    },
    "stonebig": {
        "committed": [],
        "github": "stonebig",
        "reported": [
            "3.0.0"
        ],
        "twitter": null
    },
    "whodidthis": {
        "committed": [],
        "github": "whodidthis",
        "reported": [
            "3.0.0"
        ],
        "twitter": null
    },
    "zhaohanqing95": {
        "committed": [],
        "github": "zhaohanqing95",
        "reported": [
            "3.2.0"
        ],
        "twitter": null
    },
    "zoulja": {
        "committed": [],
        "github": "zoulja",
        "reported": [
            "3.0.0"
        ],
        "twitter": null
    },
    "zwx00": {
        "committed": [],
        "github": "zwx00",
        "reported": [
            "2.5.0"
        ],
        "twitter": null
    },
    "\u5d14\u5c0f\u4e8c": {
        "committed": [],
        "github": "rogerdehe",
        "reported": [
            "2.6.0",
            "3.0.0"
        ],
        "twitter": null
    },
    "\u9ec4\u6d77": {
        "committed": [],
        "github": "hh-in-zhuzhou",
        "reported": [
            "2.6.0",
            "3.0.0"
        ],
        "twitter": null
    }
}


================================================
FILE: docs/contributors/snippet.jinja2
================================================
<!-- Blog post -->

## Community contributions

We’d like to thank these amazing people for their contributions to this release:
{% for name, details in contributors.items() -%}
- [{{ name }}](https://github.com/{{ details.github }}){{ '' if loop.last else '\n' }}
{%- endfor %}

<!-- Twitter -->

We’d like to thank these amazing people for their contributions to HTTPie {{ release }}: {% for name, details in contributors.items() if details.twitter -%}
    @{{ details.twitter }}{{ '' if loop.last else ', ' }}
{%- endfor %} 🥧


================================================
FILE: docs/installation/README.md
================================================
Here we maintain a database of installation methods, from which we generate
the installation section in docs. If you’d like add or update an installation method,
edit [methods.yml](./methods.yml), do not edit the main docs directly.

For HTTPie installation instructions see: <https://httpie.io/docs#installation>.


================================================
FILE: docs/installation/generate.py
================================================
import re
import sys
from pathlib import Path
from typing import Dict

import yaml
from jinja2 import Template

Database = Dict[str, dict]

# Files
HERE = Path(__file__).parent
DB_FILE = HERE / 'methods.yml'
DOC_FILE = HERE.parent / 'README.md'
TPL_FILE = HERE / 'installation.jinja2'

# Database keys
KEY_DOC_STRUCTURE = 'docs-structure'
KEY_TOOLS = 'tools'

# Markers in-between content will be put.
MARKER_START = '<div data-installation-instructions>'
MARKER_END = '</div>'


def generate_documentation() -> str:
    database = load_database()
    structure = build_docs_structure(database)
    template = Template(source=TPL_FILE.read_text(encoding='utf-8'))
    output = template.render(structure=structure)
    output = clean_template_output(output)
    return output


def save_doc_file(content: str) -> None:
    current_doc = load_doc_file()
    marker_start = current_doc.find(MARKER_START) + len(MARKER_START)
    assert marker_start > 0, 'cannot find the start marker'
    marker_end = current_doc.find(MARKER_END, marker_start)
    assert marker_start < marker_end, f'{marker_end=} < {marker_start=}'
    updated_doc = (
        current_doc[:marker_start]
        + '\n\n'
        + content
        + '\n\n'
        + current_doc[marker_end:]
    )
    if current_doc != updated_doc:
        DOC_FILE.write_text(updated_doc, encoding='utf-8')


def build_docs_structure(database: Database):
    tools = database[KEY_TOOLS]
    assert len(tools) == len({tool['title'] for tool in tools.values()}), 'tool titles need to be unique'
    tree = database[KEY_DOC_STRUCTURE]
    structure = []
    for platform, tools_ids in tree.items():
        assert platform.isalnum(), f'{platform=} must be alphanumeric for generated links to work'
        platform_tools = [tools[tool_id] for tool_id in tools_ids]
        structure.append((platform, platform_tools))
    return structure


def clean_template_output(output):
    output = '\n'.join(line.strip() for line in output.strip().splitlines())
    output = re.sub('\n{3,}', '\n\n', output)
    return output


def load_database() -> Database:
    return yaml.safe_load(DB_FILE.read_text(encoding='utf-8'))


def load_doc_file() -> str:
    return DOC_FILE.read_text(encoding='utf-8')


def main() -> int:
    content = generate_documentation()
    save_doc_file(content)
    return 0


if __name__ == '__main__':
    sys.exit(main())


================================================
FILE: docs/installation/installation.jinja2
================================================
<!--
THE INSTALLATION SECTION IS GENERATED

Do not edit here, but in docs/installation/.

-->
{% for platform, tools in structure %}
    - [{{ platform }}](#{{ platform.lower() }}){% endfor %} {# <= keep `endfor` here to prevent unwanted `\n` #}

{% for platform, tools in structure %}

    ### {{ platform }}

    {% for tool in tools %}
        #### {{ tool.title }}

        {% if tool.note %}
            {{ tool.note }}
        {% endif %}

        {% if tool.links.setup %}
            To install [{{ tool.name }}]({{ tool.links.homepage }}), see [its installation]({{ tool.links.setup }}).
        {% endif %}

        ```bash
        # Install httpie
        $ {{ tool.commands.install|join('\n$ ') }}
        ```

        ```bash
        # Upgrade httpie
        $ {{ tool.commands.upgrade|join('\n$ ') }}
        ```
    {% endfor %}

{% endfor %}
<!-- /GENERATED SECTION -->


================================================
FILE: docs/installation/methods.yml
================================================
# Database of HTTPie installation methods. Used to build the docs.
#
# We currently only include here methods for popular systems where we take care of the package,
# or have a good relationship with the maintainers.
#
# Each tool name should be unique (it becomes a linkable header).
# If a tools have `links.setup`, it also needs `links.homepage`.
# Some tools are available on multiple platforms, take into account when editing.
#

docs-structure:
  Universal:
    - pypi
  macOS:
    - brew-mac
    - port
  Windows:
    - chocolatey
  Linux:
    - apt
    - dnf
    - yum
    - single-binary
    - snap-linux
    - brew-linux
    - pacman
  FreeBSD:
    - pkg

tools:
  apt:
    title: Debian and Ubuntu
    note: Also works for other Debian-derived distributions like MX Linux, Linux Mint, deepin, Pop!_OS, KDE neon, Zorin OS, elementary OS, Kubuntu, Devuan, Linux Lite, Peppermint OS, Lubuntu, antiX, Xubuntu, etc.
    name: APT
    links:
      homepage: https://en.wikipedia.org/wiki/APT_(software)
      package: https://packages.debian.org/sid/web/httpie
    commands:
      install:
        - curl -SsL https://packages.httpie.io/deb/KEY.gpg | sudo gpg --dearmor -o /usr/share/keyrings/httpie.gpg
      # - curl -SsL -o /etc/apt/sources.list.d/httpie.list https://packages.httpie.io/deb/httpie.list
        - echo "deb [arch=amd64 signed-by=/usr/share/keyrings/httpie.gpg] https://packages.httpie.io/deb ./" | sudo tee /etc/apt/sources.list.d/httpie.list > /dev/null
        - sudo apt update
        - sudo apt install httpie
      upgrade:
        - sudo apt update && sudo apt upgrade httpie

  brew-mac:
    title: Homebrew
    name: Homebrew
    links:
      homepage: https://brew.sh/
      setup: https://docs.brew.sh/Installation
      package: https://formulae.brew.sh/formula/httpie
    commands:
      install:
        - brew update
        - brew install httpie
      upgrade:
        - brew update
        - brew upgrade httpie

  brew-linux:
    title: Linuxbrew
    name: Linuxbrew
    links:
      homepage: https://docs.brew.sh/Homebrew-on-Linux
      setup: https://docs.brew.sh/Homebrew-on-Linux#install
      package: https://formulae.brew.sh/formula/httpie
    commands:
      install:
        - brew update
        - brew install httpie
      upgrade:
        - brew update
        - brew upgrade httpie

  chocolatey:
    title: Chocolatey
    name: Chocolatey
    links:
      homepage: https://chocolatey.org/
      setup: https://chocolatey.org/install
      package: https://community.chocolatey.org/packages/httpie/
    commands:
      install:
        - choco install httpie
      upgrade:
        - choco upgrade httpie

  dnf:
    title: Fedora
    name: DNF
    links:
      homepage: https://fedoraproject.org/wiki/DNF
      package: https://src.fedoraproject.org/rpms/httpie
    commands:
      install:
        - dnf install httpie
      upgrade:
        - dnf upgrade httpie

  pacman:
    title: Arch Linux
    name: pacman
    note: Also works for other Arch-derived distributions like ArcoLinux, EndeavourOS, Artix Linux, etc.
    links:
      homepage: https://archlinux.org/pacman/
      package: https://archlinux.org/packages/community/any/httpie/
    commands:
      install:
        - pacman -Syu httpie
      upgrade:
        - pacman -Syu

  pkg:
    title: FreshPorts
    name: FreshPorts
    links:
      homepage: https://www.freebsd.org/cgi/man.cgi?query=pkg&sektion=8&n=1
      package: https://www.freshports.org/www/py-httpie/
    commands:
      install:
        - pkg install www/py-httpie
      upgrade:
        - pkg upgrade www/py-httpie

  port:
    title: MacPorts
    name: MacPorts
    links:
      homepage: https://www.macports.org/
      setup: https://www.macports.org/install.php
      package: https://ports.macports.org/port/httpie/
    commands:
      install:
        - port selfupdate
        - port install httpie
      upgrade:
        - port selfupdate
        - port upgrade httpie

  pypi:
    title: PyPI
    name: pip
    note: Please make sure you have Python 3.7 or newer (`python --version`).
    links:
      homepage: https://pypi.org/
      # setup: https://pip.pypa.io/en/stable/installation/
      package: https://pypi.org/project/httpie/
    commands:
      install:
        - python -m pip install --upgrade pip wheel
        - python -m pip install httpie
      upgrade:
        - python -m pip install --upgrade pip wheel
        - python -m pip install --upgrade httpie

  snap-linux:
    title: Snapcraft (Linux)
    name: Snapcraft
    links:
      homepage: https://snapcraft.io/
      setup: https://snapcraft.io/docs/installing-snapd
      package: https://snapcraft.io/httpie
    commands:
      install:
        - snap install httpie
      upgrade:
        - snap refresh httpie

  yum:
    title: CentOS and RHEL
    name: Yum
    note: Also works for other RHEL-derived distributions like ClearOS, Oracle Linux, etc.
    links:
      homepage: http://yum.baseurl.org/
      package: https://src.fedoraproject.org/rpms/httpie
    commands:
      install:
        - yum install epel-release
        - yum install httpie
      upgrade:
        - yum upgrade httpie

  single-binary:
    title: Single binary executables
    name: Single binary executables
    note: Get the standalone HTTPie Linux executables when you don't want to go through the full installation process.
    links:
    commands:
      install:
        - https --download packages.httpie.io/binaries/linux/http-latest -o http
        - ln -ls ./http ./https
        - chmod +x ./http ./https
      upgrade:
        - https --download packages.httpie.io/binaries/linux/http-latest -o http


================================================
FILE: docs/markdownlint.rb
================================================
# Rules for <https://github.com/markdownlint/markdownlint>

# Load all rules by default
all

#
# Tweak rules
#

# MD002 First header should be a top level header
# Because we use HTML to hide them on the website.
exclude_rule 'MD002'

# MD007 Allow unordered list indentation
exclude_rule 'MD007'

# MD013 Line length
exclude_rule 'MD013'

# MD014 Dollar signs used before commands without showing output
exclude_rule 'MD014'

# MD028 Blank line inside blockquote
exclude_rule 'MD028'

# MD012 Multiple consecutive blank lines
exclude_rule 'MD012'

# Tell the linter to use ordered lists:
#   1. Foo
#   2. Bar
#   3. Baz
#
# Instead of:
#   1. Foo
#   1. Bar
#   1. Baz
rule 'MD029', :style => :ordered

# MD033 Inline HTML
# TODO: Tweak elements when https://github.com/markdownlint/markdownlint/issues/118 will be done?
exclude_rule 'MD033'

# MD034 Bare URL used
# TODO: Remove when https://github.com/markdownlint/markdownlint/issues/328 will be fixed.
exclude_rule 'MD034'

# MD041 First line in file should be a top level header
# Because we use HTML to hide them on the website.
exclude_rule 'MD041'


================================================
FILE: docs/packaging/README.md
================================================
# HTTPie release process

Welcome on the documentation part of the **HTTPie release process**.

- If you do not know HTTPie, have a look [here](https://httpie.io/cli).
- If you are looking for HTTPie installation or upgrade instructions, then you can find all you need for your OS on [that page](https://httpie.io/docs#installation). In the case you do not find your OS, [let us know](https://github.com/httpie/cli/issues/).
- If you are looking for technical information about the HTTPie packaging, then you are at the good place.

## About

You are looking at the HTTPie packaging documentation, where you will find valuable information about how we manage to release HTTPie to lots of OSes, including technical data that may be worth reading if you are a package maintainer.

The overall release process starts simple:

1. Bump the version identifiers in the following places:
    - `httpie/__init__.py`
    - `docs/packaging/windows-chocolatey/httpie.nuspec`
    - `CHANGELOG.md`
2. Commit your changes and make a PR against the `master`.
3. Merge the PR, and tag the last commit with your version identifier.
4. Make a GitHub release (by copying the text in `CHANGELOG.md`)
5. Push that release to PyPI (dispatch the `Release PyPI` GitHub action).
6. Once PyPI is ready, push the release to the Snap, Homebrew and Chocolatey with their respective actions.
7. Go to the [`httpie/debian.httpie.io`](https://github.com/httpie/debian.httpie.io) repo and trigger the package index workflow.

## Company-specific tasks

- Blank the `master_and_released_docs_differ_after` value in [config.json](https://github.com/httpie/cli/blob/master/docs/config.json).
- Update the [contributors list](../contributors).
- Update the HTTPie version bundled into [Termible](https://termible.io/) ([example](https://github.com/httpie/termible/pull/1)).

## Finally, spread dowstream

Find out how we do release new versions for each and every supported OS in the following table.
A more complete state of deployment can be found on [repology](https://repology.org/project/httpie/versions), including unofficial packages.

|                                           OS | Maintainer     |
| -------------------------------------------: | -------------- |
|       [Arch Linux, and derived](linux-arch/) | trusted person |
|   [CentOS, RHEL, and derived](linux-centos/) | trusted person |
|                      [Fedora](linux-fedora/) | trusted person |
| [Debian, Ubuntu, and derived](linux-debian/) | **HTTPie**     |
|                 [Homebrew, Linuxbrew](brew/) | **HTTPie**     |
|                      [Snapcraft](snapcraft/) | **HTTPie**     |
|  [Windows — Chocolatey](windows-chocolatey/) | **HTTPie**     |

:new: You do not find your system or you would like to see HTTPie supported on another OS? Then [let us know](https://github.com/httpie/cli/issues/).


================================================
FILE: docs/packaging/brew/README.md
================================================
# HTTPie on Homebrew, and Linuxbrew

Welcome to the documentation about **packaging HTTPie for Homebrew**.

- If you do not know HTTPie, have a look [here](https://httpie.io/cli).
- If you are looking for HTTPie installation or upgrade instructions on Homebrew, then you can find them on [that page](https://httpie.io/docs#homebrew) ([that one](https://httpie.io/docs#linuxbrew) for Linuxbrew).
- If you are looking for technical information about the HTTPie packaging on Homebrew, then you are in a good place.

## About

This document contains technical details, where we describe how to create a patch for the latest HTTPie version for Homebrew. They apply to Linuxbrew as well.
We will discuss setting up the environment, installing development tools, installing and testing changes before submitting a patch downstream.

## Overall process

The brew deployment is completely automated, and only requires a trigger to [`Release on Homebrew`](https://github.com/httpie/cli/actions/workflows/release-brew.yml) action
from the release manager.

If it is needed to be done manually, the following command can be used:

```console
$ brew bump-formula-pr httpie --version={TARGET_VERSION}
```

which will bump the formula, and create a PR against the package index.

## Hacking

Make your changes, test the formula through the [`Test Brew 
Download .txt
gitextract__pn2_t9i/

├── .editorconfig
├── .github/
│   ├── ISSUE_TEMPLATE/
│   │   ├── bug_report.md
│   │   ├── feature_request.md
│   │   └── other.md
│   ├── dependabot.yml
│   └── workflows/
│       ├── benchmark.yml
│       ├── code-style.yml
│       ├── content.yml
│       ├── coverage.yml
│       ├── docs-check-markdown.yml
│       ├── docs-deploy.yml
│       ├── release-brew.yml
│       ├── release-choco.yml
│       ├── release-linux-standalone.yml
│       ├── release-pypi.yml
│       ├── release-snap.yml
│       ├── stale.yml
│       ├── test-package-linux-snap.yml
│       ├── test-package-mac-brew.yml
│       └── tests.yml
├── .gitignore
├── .packit.yaml
├── AUTHORS.md
├── CHANGELOG.md
├── CODE_OF_CONDUCT.md
├── CONTRIBUTING.md
├── LICENSE
├── MANIFEST.in
├── Makefile
├── README.md
├── SECURITY.md
├── docs/
│   ├── README.md
│   ├── config.json
│   ├── contributors/
│   │   ├── README.md
│   │   ├── fetch.py
│   │   ├── generate.py
│   │   ├── people.json
│   │   └── snippet.jinja2
│   ├── installation/
│   │   ├── README.md
│   │   ├── generate.py
│   │   ├── installation.jinja2
│   │   └── methods.yml
│   ├── markdownlint.rb
│   └── packaging/
│       ├── README.md
│       ├── brew/
│       │   ├── README.md
│       │   ├── httpie.rb
│       │   └── update.sh
│       ├── linux-arch/
│       │   ├── PKGBUILD
│       │   └── README.md
│       ├── linux-centos/
│       │   └── README.md
│       ├── linux-debian/
│       │   └── README.md
│       ├── linux-fedora/
│       │   ├── README.md
│       │   ├── httpie.spec.txt
│       │   └── update.sh
│       ├── mac-ports/
│       │   ├── Portfile
│       │   └── README.md
│       ├── snapcraft/
│       │   └── README.md
│       └── windows-chocolatey/
│           ├── README.md
│           ├── httpie.nuspec
│           └── tools/
│               ├── chocolateyinstall.ps1
│               └── chocolateyuninstall.ps1
├── extras/
│   ├── httpie-completion.bash
│   ├── httpie-completion.fish
│   ├── man/
│   │   ├── http.1
│   │   ├── httpie.1
│   │   └── https.1
│   ├── packaging/
│   │   └── linux/
│   │       ├── Dockerfile
│   │       ├── README.md
│   │       ├── build.py
│   │       ├── get_release_artifacts.sh
│   │       └── scripts/
│   │           ├── hooks/
│   │           │   └── hook-pip.py
│   │           ├── http_cli.py
│   │           └── httpie_cli.py
│   ├── profiling/
│   │   ├── README.md
│   │   ├── benchmarks.py
│   │   └── run.py
│   └── scripts/
│       └── generate_man_pages.py
├── httpie/
│   ├── __init__.py
│   ├── __main__.py
│   ├── adapters.py
│   ├── cli/
│   │   ├── __init__.py
│   │   ├── argparser.py
│   │   ├── argtypes.py
│   │   ├── constants.py
│   │   ├── definition.py
│   │   ├── dicts.py
│   │   ├── exceptions.py
│   │   ├── nested_json/
│   │   │   ├── __init__.py
│   │   │   ├── errors.py
│   │   │   ├── interpret.py
│   │   │   ├── parse.py
│   │   │   └── tokens.py
│   │   ├── options.py
│   │   ├── requestitems.py
│   │   └── utils.py
│   ├── client.py
│   ├── compat.py
│   ├── config.py
│   ├── context.py
│   ├── cookies.py
│   ├── core.py
│   ├── downloads.py
│   ├── encoding.py
│   ├── internal/
│   │   ├── __build_channel__.py
│   │   ├── __init__.py
│   │   ├── daemon_runner.py
│   │   ├── daemons.py
│   │   └── update_warnings.py
│   ├── legacy/
│   │   ├── __init__.py
│   │   ├── v3_1_0_session_cookie_format.py
│   │   └── v3_2_0_session_header_format.py
│   ├── manager/
│   │   ├── __init__.py
│   │   ├── __main__.py
│   │   ├── cli.py
│   │   ├── compat.py
│   │   ├── core.py
│   │   └── tasks/
│   │       ├── __init__.py
│   │       ├── check_updates.py
│   │       ├── export_args.py
│   │       ├── plugins.py
│   │       └── sessions.py
│   ├── models.py
│   ├── output/
│   │   ├── __init__.py
│   │   ├── formatters/
│   │   │   ├── __init__.py
│   │   │   ├── colors.py
│   │   │   ├── headers.py
│   │   │   ├── json.py
│   │   │   └── xml.py
│   │   ├── lexers/
│   │   │   ├── __init__.py
│   │   │   ├── common.py
│   │   │   ├── http.py
│   │   │   ├── json.py
│   │   │   └── metadata.py
│   │   ├── models.py
│   │   ├── processing.py
│   │   ├── streams.py
│   │   ├── ui/
│   │   │   ├── __init__.py
│   │   │   ├── man_pages.py
│   │   │   ├── palette.py
│   │   │   ├── rich_help.py
│   │   │   ├── rich_palette.py
│   │   │   ├── rich_progress.py
│   │   │   └── rich_utils.py
│   │   ├── utils.py
│   │   └── writer.py
│   ├── plugins/
│   │   ├── __init__.py
│   │   ├── base.py
│   │   ├── builtin.py
│   │   ├── manager.py
│   │   └── registry.py
│   ├── sessions.py
│   ├── ssl_.py
│   ├── status.py
│   ├── uploads.py
│   └── utils.py
├── pytest.ini
├── setup.cfg
├── setup.py
├── snapcraft.yaml
└── tests/
    ├── README.md
    ├── __init__.py
    ├── client_certs/
    │   ├── client.crt
    │   ├── client.key
    │   ├── client.pem
    │   └── password_protected/
    │       ├── client.key
    │       └── client.pem
    ├── conftest.py
    ├── fixtures/
    │   ├── .editorconfig
    │   ├── __init__.py
    │   ├── session_data/
    │   │   ├── new/
    │   │   │   ├── cookies_dict.json
    │   │   │   ├── cookies_dict_dev_version.json
    │   │   │   ├── cookies_dict_with_extras.json
    │   │   │   ├── empty_cookies_dict.json
    │   │   │   ├── empty_cookies_list.json
    │   │   │   ├── empty_headers_dict.json
    │   │   │   ├── empty_headers_list.json
    │   │   │   ├── headers_cookies_dict_mixed.json
    │   │   │   ├── headers_dict.json
    │   │   │   ├── headers_dict_extras.json
    │   │   │   └── headers_list.json
    │   │   └── old/
    │   │       ├── cookies_dict.json
    │   │       ├── cookies_dict_dev_version.json
    │   │       ├── cookies_dict_with_extras.json
    │   │       ├── empty_cookies_dict.json
    │   │       ├── empty_cookies_list.json
    │   │       ├── empty_headers_dict.json
    │   │       ├── empty_headers_list.json
    │   │       ├── headers_cookies_dict_mixed.json
    │   │       ├── headers_dict.json
    │   │       ├── headers_dict_extras.json
    │   │       └── headers_list.json
    │   ├── test.json
    │   ├── test.txt
    │   ├── test_with_dupe_keys.json
    │   └── xmldata/
    │       ├── invalid/
    │       │   ├── cyclic.xml
    │       │   ├── external.xml
    │       │   ├── external_file.xml
    │       │   ├── not-xml.xml
    │       │   ├── quadratic.xml
    │       │   ├── xalan_exec.xsl
    │       │   ├── xalan_write.xsl
    │       │   ├── xmlbomb.xml
    │       │   └── xmlbomb2.xml
    │       ├── valid/
    │       │   ├── custom-header.xml
    │       │   ├── custom-header_formatted.xml
    │       │   ├── dtd_formatted.xml
    │       │   ├── dtd_raw.xml
    │       │   ├── simple-ns_formatted.xml
    │       │   ├── simple-ns_raw.xml
    │       │   ├── simple-single-tag_formatted.xml
    │       │   ├── simple-single-tag_raw.xml
    │       │   ├── simple-standalone-no_formatted.xml
    │       │   ├── simple-standalone-no_raw.xml
    │       │   ├── simple-standalone-yes_formatted.xml
    │       │   ├── simple-standalone-yes_raw.xml
    │       │   ├── simple_formatted.xml
    │       │   └── simple_raw.xml
    │       └── xhtml/
    │           ├── xhtml_formatted.xml
    │           ├── xhtml_formatted_python_less_than_3.8.xml
    │           └── xhtml_raw.xml
    ├── test_auth.py
    ├── test_auth_plugins.py
    ├── test_binary.py
    ├── test_cli.py
    ├── test_cli_ui.py
    ├── test_cli_utils.py
    ├── test_compress.py
    ├── test_config.py
    ├── test_cookie.py
    ├── test_cookie_on_redirects.py
    ├── test_defaults.py
    ├── test_downloads.py
    ├── test_encoding.py
    ├── test_errors.py
    ├── test_exit_status.py
    ├── test_httpie.py
    ├── test_httpie_cli.py
    ├── test_json.py
    ├── test_meta.py
    ├── test_offline.py
    ├── test_output.py
    ├── test_parser_schema.py
    ├── test_plugins_cli.py
    ├── test_redirects.py
    ├── test_regressions.py
    ├── test_sessions.py
    ├── test_ssl.py
    ├── test_stream.py
    ├── test_tokens.py
    ├── test_transport_plugin.py
    ├── test_update_warnings.py
    ├── test_uploads.py
    ├── test_windows.py
    ├── test_xml.py
    └── utils/
        ├── __init__.py
        ├── http_server.py
        ├── matching/
        │   ├── __init__.py
        │   ├── parsing.py
        │   ├── test_matching.py
        │   └── tokens.py
        └── plugins_cli.py
Download .txt
SYMBOL INDEX (1196 symbols across 116 files)

FILE: docs/contributors/fetch.py
  class FinishedForNow (line 40) | class FinishedForNow(Exception):
  function main (line 44) | def main(previous_release: str, current_release: str) -> int:
  function find_committers (line 71) | def find_committers(since: str, until: str) -> FullNames:
  function find_reporters (line 101) | def find_reporters(since: str, until: str) -> GitHubLogins:
  function merge_all_the_people (line 129) | def merge_all_the_people(release: str, contributors: People, committers:...
  function release_date (line 180) | def release_date(release: str) -> str:
  function load_awesome_people (line 185) | def load_awesome_people() -> People:
  function fetch (line 193) | def fetch(url: str, params: Optional[Dict[str, str]] = None) -> UserInfo:
  function new_person (line 218) | def new_person(**kwargs: str) -> Person:
  function user (line 224) | def user(fullname: Optional[str] = '', github_username: Optional[str] = ...
  function fetch_missing_users_details (line 241) | def fetch_missing_users_details(people: People) -> None:
  function save_awesome_people (line 252) | def save_awesome_people(people: People) -> None:
  function debug (line 258) | def debug(*args: Any) -> None:

FILE: docs/contributors/generate.py
  function generate_snippets (line 26) | def generate_snippets(release: str) -> str:

FILE: docs/installation/generate.py
  function generate_documentation (line 26) | def generate_documentation() -> str:
  function save_doc_file (line 35) | def save_doc_file(content: str) -> None:
  function build_docs_structure (line 52) | def build_docs_structure(database: Database):
  function clean_template_output (line 64) | def clean_template_output(output):
  function load_database (line 70) | def load_database() -> Database:
  function load_doc_file (line 74) | def load_doc_file() -> str:
  function main (line 78) | def main() -> int:

FILE: docs/packaging/brew/httpie.rb
  class Httpie (line 1) | class Httpie < Formula
    method install (line 72) | def install

FILE: extras/packaging/linux/build.py
  function build_binaries (line 23) | def build_binaries() -> Iterator[Tuple[str, Path]]:
  function build_packages (line 47) | def build_packages(http_binary: Path, httpie_binary: Path) -> None:
  function main (line 98) | def main():

FILE: extras/packaging/linux/scripts/hooks/hook-pip.py
  function hook (line 4) | def hook(hook_api):

FILE: extras/profiling/benchmarks.py
  class QuietSimpleHTTPServer (line 55) | class QuietSimpleHTTPServer(SimpleHTTPRequestHandler):
    method log_message (line 56) | def log_message(self, *args, **kwargs):
  function start_server (line 61) | def start_server():
  class Context (line 90) | class Context:
    method run (line 95) | def run(self) -> pyperf.BenchmarkSuite:
    method cmd (line 100) | def cmd(self) -> List[str]:
    method server (line 109) | def server(self) -> str:
    method __enter__ (line 112) | def __enter__(self):
    method __exit__ (line 115) | def __exit__(self, *exc_info):
  class BaseRunner (line 120) | class BaseRunner:
    method __post_init__ (line 129) | def __post_init__(self):
    method run (line 132) | def run(self, context: Context) -> pyperf.Benchmark:
    method name (line 136) | def name(self) -> str:
  class CommandRunner (line 141) | class CommandRunner(BaseRunner):
    method run (line 148) | def run(self, context: Context) -> pyperf.Benchmark:
  class DownloadRunner (line 153) | class DownloadRunner(BaseRunner):
    method run (line 161) | def run(self, context: Context) -> pyperf.Benchmark:
  function main (line 188) | def main() -> None:

FILE: extras/profiling/run.py
  function call (line 60) | def call(*args, **kwargs):
  class Environment (line 65) | class Environment:
    method on_repo (line 73) | def on_repo(self) -> Generator[Tuple[Path, Dict[str, str]], None, None]:
  class HTTPieEnvironment (line 83) | class HTTPieEnvironment(Environment):
    method on_repo (line 89) | def on_repo(self) -> Generator[Path, None, None]:
  class LocalCommandEnvironment (line 140) | class LocalCommandEnvironment(Environment):
    method on_repo (line 144) | def on_repo(self) -> Generator[Path, None, None]:
  function dump_results (line 148) | def dump_results(
  function compare (line 168) | def compare(*args, directory: Path, min_speed: Optional[str] = None):
  function run (line 179) | def run(
  function main (line 223) | def main() -> None:

FILE: extras/scripts/generate_man_pages.py
  class ManPageBuilder (line 41) | class ManPageBuilder:
    method __init__ (line 42) | def __init__(self):
    method title_line (line 45) | def title_line(
    method set_name (line 57) | def set_name(self, program_name: str) -> None:
    method write (line 61) | def write(self, text: str, *, bold: bool = False) -> None:
    method separate (line 66) | def separate(self) -> None:
    method format_desc (line 69) | def format_desc(self, desc: str) -> str:
    method add_comment (line 78) | def add_comment(self, comment: str) -> None:
    method add_options (line 81) | def add_options(self, options: Iterable[str], *, metavar: Optional[str...
    method build (line 87) | def build(self) -> str:
    method section (line 91) | def section(self, section_name: str) -> Iterator[None]:
    method underline (line 97) | def underline(self, text: str) -> str:
    method boldify (line 100) | def boldify(self, text: str) -> str:
  function _escape_and_dedent (line 104) | def _escape_and_dedent(text: str) -> str:
  function to_man_page (line 116) | def to_man_page(program_name: str, spec: ParserSpec, *, is_top_level_cmd...
  function main (line 177) | def main() -> None:

FILE: httpie/__main__.py
  function main (line 6) | def main():

FILE: httpie/adapters.py
  class HTTPieHTTPAdapter (line 5) | class HTTPieHTTPAdapter(HTTPAdapter):
    method build_response (line 7) | def build_response(self, req, resp):

FILE: httpie/cli/argparser.py
  class HTTPieHelpFormatter (line 32) | class HTTPieHelpFormatter(RawDescriptionHelpFormatter):
    method __init__ (line 42) | def __init__(self, max_help_position=6, *args, **kwargs):
    method _split_lines (line 47) | def _split_lines(self, text, width):
    method add_usage (line 51) | def add_usage(self, usage, actions, groups, prefix=None):
  class BaseHTTPieArgumentParser (line 81) | class BaseHTTPieArgumentParser(argparse.ArgumentParser):
    method __init__ (line 82) | def __init__(self, *args, **kwargs):
    method parse_args (line 90) | def parse_args(
    method _print_message (line 109) | def _print_message(self, message, file=None):
  class HTTPieManagerArgumentParser (line 128) | class HTTPieManagerArgumentParser(BaseHTTPieArgumentParser):
    method parse_known_args (line 129) | def parse_known_args(self, args=None, namespace=None):
  class HTTPieArgumentParser (line 138) | class HTTPieArgumentParser(BaseHTTPieArgumentParser):
    method __init__ (line 146) | def __init__(self, *args, formatter_class=HTTPieHelpFormatter, **kwargs):
    method parse_args (line 151) | def parse_args(
    method _process_request_type (line 196) | def _process_request_type(self):
    method _process_url (line 205) | def _process_url(self):
    method _setup_standard_streams (line 227) | def _setup_standard_streams(self):
    method _process_ssl_cert (line 269) | def _process_ssl_cert(self):
    method _process_auth (line 282) | def _process_auth(self):
    method _apply_no_options (line 357) | def _apply_no_options(self, no_options):
    method _body_from_file (line 382) | def _body_from_file(self, fd):
    method _body_from_input (line 391) | def _body_from_input(self, data):
    method _ensure_one_data_source (line 399) | def _ensure_one_data_source(self, *other_sources):
    method _guess_method (line 409) | def _guess_method(self):
    method _parse_items (line 448) | def _parse_items(self):
    method _process_output_options (line 492) | def _process_output_options(self):
    method _process_pretty_options (line 531) | def _process_pretty_options(self):
    method _process_download_options (line 542) | def _process_download_options(self):
    method _process_format_options (line 554) | def _process_format_options(self):
    method print_manual (line 561) | def print_manual(self):
    method print_usage (line 575) | def print_usage(self, file):
    method error (line 598) | def error(self, message):

FILE: httpie/cli/argtypes.py
  class KeyValueArg (line 12) | class KeyValueArg:
    method __init__ (line 15) | def __init__(self, key: str, value: Optional[str], sep: str, orig: str):
    method __eq__ (line 21) | def __eq__(self, other: 'KeyValueArg'):
    method __repr__ (line 24) | def __repr__(self):
  class SessionNameValidator (line 28) | class SessionNameValidator:
    method __init__ (line 30) | def __init__(self, error_message: str):
    method __call__ (line 33) | def __call__(self, value: str) -> str:
  class Escaped (line 41) | class Escaped(str):
    method __repr__ (line 44) | def __repr__(self):
  class KeyValueArgType (line 48) | class KeyValueArgType:
    method __init__ (line 58) | def __init__(self, *separators: str):
    method __call__ (line 64) | def __call__(self, s: str) -> KeyValueArg:
    method tokenize (line 110) | def tokenize(self, s: str) -> List[Union[str, Escaped]]:
  class PromptMixin (line 133) | class PromptMixin:
    method _prompt_password (line 134) | def _prompt_password(self, prompt: str) -> str:
    method _getpass (line 143) | def _getpass(prompt):
  class SSLCredentials (line 148) | class SSLCredentials(PromptMixin):
    method __init__ (line 151) | def __init__(self, value: Optional[str]) -> None:
    method prompt_password (line 154) | def prompt_password(self, key_file: str) -> None:
  class AuthCredentials (line 158) | class AuthCredentials(KeyValueArg, PromptMixin):
    method has_password (line 161) | def has_password(self) -> bool:
    method prompt_password (line 164) | def prompt_password(self, host: str) -> None:
  class AuthCredentialsArgType (line 168) | class AuthCredentialsArgType(KeyValueArgType):
    method __call__ (line 173) | def __call__(self, s):
  function readable_file_arg (line 194) | def readable_file_arg(filename):
  function parse_format_options (line 202) | def parse_format_options(s: str, defaults: Optional[dict]) -> dict:
  function response_charset_type (line 262) | def response_charset_type(encoding: str) -> str:
  function response_mime_type (line 271) | def response_mime_type(mime_type: str) -> str:

FILE: httpie/cli/constants.py
  class PrettyOptions (line 96) | class PrettyOptions(enum.Enum):
  class RequestType (line 131) | class RequestType(enum.Enum):

FILE: httpie/cli/definition.py
  function format_style_help (line 249) | def format_style_help(available_styles, *, isolation_mode: bool = False):
  function format_auth_help (line 626) | def format_auth_help(auth_plugins_mapping, *, isolation_mode: bool = Fal...

FILE: httpie/cli/dicts.py
  class BaseMultiDict (line 6) | class BaseMultiDict(MultiDict):
  class HTTPHeadersDict (line 12) | class HTTPHeadersDict(CIMultiDict, BaseMultiDict):
    method add (line 18) | def add(self, key, value):
    method remove_item (line 38) | def remove_item(self, key, value):
  class RequestJSONDataDict (line 49) | class RequestJSONDataDict(OrderedDict):
  class MultiValueOrderedDict (line 53) | class MultiValueOrderedDict(OrderedDict):
    method __setitem__ (line 56) | def __setitem__(self, key, value):
    method items (line 73) | def items(self):
  class RequestQueryParamsDict (line 81) | class RequestQueryParamsDict(MultiValueOrderedDict):
  class RequestDataDict (line 85) | class RequestDataDict(MultiValueOrderedDict):
  class MultipartRequestDataDict (line 89) | class MultipartRequestDataDict(MultiValueOrderedDict):
  class RequestFilesDict (line 93) | class RequestFilesDict(RequestDataDict):

FILE: httpie/cli/exceptions.py
  class ParseError (line 1) | class ParseError(Exception):

FILE: httpie/cli/nested_json/errors.py
  class NestedJSONSyntaxError (line 6) | class NestedJSONSyntaxError(ValueError):
    method __init__ (line 7) | def __init__(
    method __str__ (line 19) | def __str__(self):

FILE: httpie/cli/nested_json/interpret.py
  function interpret_nested_json (line 23) | def interpret_nested_json(pairs: Iterable[Tuple[str, str]]) -> dict:
  function interpret (line 30) | def interpret(context: Any, key: str, value: Any) -> Any:
  function wrap_with_dict (line 107) | def wrap_with_dict(context):
  function unwrap_top_level_list_if_needed (line 119) | def unwrap_top_level_list_if_needed(data: dict):

FILE: httpie/cli/nested_json/parse.py
  function parse (line 23) | def parse(source: str) -> Iterator[Path]:
  function tokenize (line 127) | def tokenize(source: str) -> Iterator[Token]:
  function check_escaped_int (line 181) | def check_escaped_int(value: str) -> str:
  function assert_cant_happen (line 192) | def assert_cant_happen():

FILE: httpie/cli/nested_json/tokens.py
  class TokenKind (line 11) | class TokenKind(Enum):
    method to_name (line 18) | def to_name(self) -> str:
  class Token (line 37) | class Token(NamedTuple):
  class PathAction (line 44) | class PathAction(Enum):
    method to_string (line 51) | def to_string(self) -> str:
  class Path (line 55) | class Path:
    method __init__ (line 56) | def __init__(
    method reconstruct (line 68) | def reconstruct(self) -> str:
  class NestedJSONArray (line 79) | class NestedJSONArray(list):

FILE: httpie/cli/options.py
  class Qualifiers (line 12) | class Qualifiers(Enum):
  function map_qualifiers (line 19) | def map_qualifiers(
  function drop_keys (line 28) | def drop_keys(
  class ParserSpec (line 42) | class ParserSpec:
    method finalize (line 50) | def finalize(self) -> 'ParserSpec':
    method add_group (line 59) | def add_group(self, name: str, **kwargs) -> 'Group':
    method serialize (line 64) | def serialize(self) -> Dict[str, Any]:
  class Group (line 73) | class Group:
    method finalize (line 79) | def finalize(self) -> None:
    method add_argument (line 83) | def add_argument(self, *args, **kwargs):
    method serialize (line 89) | def serialize(self) -> Dict[str, Any]:
  class Argument (line 98) | class Argument(typing.NamedTuple):
    method post_init (line 102) | def post_init(self):
    method serialize (line 113) | def serialize(self, *, isolation_mode: bool = False) -> Dict[str, Any]:
    method is_positional (line 168) | def is_positional(self):
    method is_hidden (line 172) | def is_hidden(self):
    method __getattr__ (line 175) | def __getattr__(self, attribute_name):
  function to_argparse (line 193) | def to_argparse(
  function to_data (line 238) | def to_data(abstract_options: ParserSpec) -> Dict[str, Any]:
  function parser_to_parser_spec (line 242) | def parser_to_parser_spec(parser: argparse.ArgumentParser, **kwargs) -> ...

FILE: httpie/cli/requestitems.py
  class RequestItems (line 24) | class RequestItems:
    method __init__ (line 26) | def __init__(self, request_type: Optional[RequestType] = None):
    method from_args (line 37) | def from_args(
  function process_header_arg (line 126) | def process_header_arg(arg: KeyValueArg) -> Optional[str]:
  function process_embed_header_arg (line 130) | def process_embed_header_arg(arg: KeyValueArg) -> str:
  function process_empty_header_arg (line 134) | def process_empty_header_arg(arg: KeyValueArg) -> str:
  function process_query_param_arg (line 142) | def process_query_param_arg(arg: KeyValueArg) -> str:
  function process_embed_query_param_arg (line 146) | def process_embed_query_param_arg(arg: KeyValueArg) -> str:
  function process_file_upload_arg (line 150) | def process_file_upload_arg(arg: KeyValueArg) -> Tuple[str, IO, str]:
  function convert_json_value_to_form_if_needed (line 165) | def convert_json_value_to_form_if_needed(in_json_mode: bool, processor: ...
  function process_data_item_arg (line 189) | def process_data_item_arg(arg: KeyValueArg) -> str:
  function process_data_embed_file_contents_arg (line 193) | def process_data_embed_file_contents_arg(arg: KeyValueArg) -> str:
  function process_data_embed_raw_json_file_arg (line 197) | def process_data_embed_raw_json_file_arg(arg: KeyValueArg) -> JSONType:
  function process_data_raw_json_embed_arg (line 203) | def process_data_raw_json_embed_arg(arg: KeyValueArg) -> JSONType:
  function process_data_nested_json_embed_args (line 208) | def process_data_nested_json_embed_args(pairs) -> Dict[str, JSONType]:
  function load_text_file (line 212) | def load_text_file(item: KeyValueArg) -> str:
  function load_json (line 226) | def load_json(arg: KeyValueArg, contents: str) -> JSONType:

FILE: httpie/cli/utils.py
  class Manual (line 7) | class Manual(argparse.Action):
    method __init__ (line 8) | def __init__(
    method __call__ (line 23) | def __call__(self, parser, namespace, values, option_string=None):
  class LazyChoices (line 28) | class LazyChoices(argparse.Action, Generic[T]):
    method __init__ (line 29) | def __init__(
    method load (line 49) | def load(self) -> T:
    method help (line 57) | def help(self) -> str:
    method help (line 66) | def help(self, value: Any) -> None:
    method __contains__ (line 69) | def __contains__(self, item: Any) -> bool:
    method __iter__ (line 72) | def __iter__(self) -> Iterator[T]:
    method __call__ (line 78) | def __call__(self, parser, namespace, values, option_string=None):

FILE: httpie/client.py
  function collect_messages (line 43) | def collect_messages(
  function max_headers (line 145) | def max_headers(limit):
  function build_requests_session (line 156) | def build_requests_session(
  function dump_request (line 187) | def dump_request(kwargs: dict):
  function finalize_headers (line 192) | def finalize_headers(headers: HTTPHeadersDict) -> HTTPHeadersDict:
  function transform_headers (line 212) | def transform_headers(
  function apply_missing_repeated_headers (line 233) | def apply_missing_repeated_headers(
  function make_default_headers (line 263) | def make_default_headers(args: argparse.Namespace) -> HTTPHeadersDict:
  function make_send_kwargs (line 281) | def make_send_kwargs(args: argparse.Namespace) -> dict:
  function make_send_kwargs_mergeable_from_env (line 288) | def make_send_kwargs_mergeable_from_env(args: argparse.Namespace) -> dict:
  function json_dict_to_request_body (line 314) | def json_dict_to_request_body(data: Dict[str, Any]) -> str:
  function make_request_kwargs (line 325) | def make_request_kwargs(
  function ensure_path_as_is (line 377) | def ensure_path_as_is(orig_url: str, prepped_url: str) -> str:

FILE: httpie/compat.py
  class cached_property (line 25) | class cached_property:
    method func (line 38) | def func(instance):
    method __init__ (line 44) | def __init__(self, func, name=None):
    method __set_name__ (line 48) | def __set_name__(self, owner, name):
    method __get__ (line 58) | def __get__(self, instance, cls=None):
  function find_entry_points (line 79) | def find_entry_points(entry_points: Any, group: str) -> Iterable[importl...
  function get_dist_name (line 86) | def get_dist_name(entry_point: importlib_metadata.EntryPoint) -> Optiona...
  function ensure_default_certs_loaded (line 104) | def ensure_default_certs_loaded(ssl_context: SSLContext) -> None:

FILE: httpie/config.py
  function get_default_config_dir (line 20) | def get_default_config_dir() -> Path:
  class ConfigFileError (line 61) | class ConfigFileError(Exception):
  function read_raw_config (line 65) | def read_raw_config(config_type: str, path: Path) -> Dict[str, Any]:
  class BaseConfigDict (line 80) | class BaseConfigDict(dict):
    method __init__ (line 85) | def __init__(self, path: Path):
    method ensure_directory (line 89) | def ensure_directory(self):
    method is_new (line 92) | def is_new(self) -> bool:
    method pre_process_data (line 95) | def pre_process_data(self, data: Dict[str, Any]) -> Dict[str, Any]:
    method post_process_data (line 99) | def post_process_data(self, data: Dict[str, Any]) -> Dict[str, Any]:
    method load (line 103) | def load(self):
    method save (line 110) | def save(self, *, bump_version: bool = False):
    method version (line 131) | def version(self):
  class Config (line 137) | class Config(BaseConfigDict):
    method __init__ (line 143) | def __init__(self, directory: Union[str, Path] = DEFAULT_CONFIG_DIR):
    method default_options (line 149) | def default_options(self) -> list:
    method _configured_path (line 152) | def _configured_path(self, config_option: str, default: str) -> None:
    method plugins_dir (line 158) | def plugins_dir(self) -> Path:
    method version_info_file (line 162) | def version_info_file(self) -> Path:
    method developer_mode (line 166) | def developer_mode(self) -> bool:

FILE: httpie/context.py
  class LogLevel (line 27) | class LogLevel(str, Enum):
  class Environment (line 46) | class Environment:
    method __init__ (line 93) | def __init__(self, devnull=None, **kwargs):
    method __str__ (line 123) | def __str__(self):
    method __repr__ (line 134) | def __repr__(self):
    method config (line 140) | def config(self) -> Config:
    method devnull (line 152) | def devnull(self) -> IO:
    method as_silent (line 158) | def as_silent(self) -> Iterator[None]:
    method log_error (line 170) | def log_error(self, msg: str, level: LogLevel = LogLevel.ERROR) -> None:
    method apply_warnings_filter (line 184) | def apply_warnings_filter(self) -> None:
    method _make_rich_console (line 188) | def _make_rich_console(
    method rich_console (line 212) | def rich_console(self):
    method rich_error_console (line 216) | def rich_error_console(self):

FILE: httpie/cookies.py
  class HTTPieCookiePolicy (line 8) | class HTTPieCookiePolicy(cookiejar.DefaultCookiePolicy):
    method return_ok_secure (line 9) | def return_ok_secure(self, cookie, request):
    method _is_local_host (line 22) | def _is_local_host(self, hostname):

FILE: httpie/core.py
  function raw_main (line 32) | def raw_main(
  function main (line 146) | def main(
  function program (line 170) | def program(args: argparse.Namespace, env: Environment) -> ExitStatus:
  function print_debug_info (line 270) | def print_debug_info(env: Environment):
  function decode_raw_args (line 285) | def decode_raw_args(

FILE: httpie/downloads.py
  class ContentRangeError (line 23) | class ContentRangeError(ValueError):
  function parse_content_range (line 27) | def parse_content_range(content_range: str, resumed_from: int) -> int:
  function filename_from_content_disposition (line 85) | def filename_from_content_disposition(
  function filename_from_url (line 106) | def filename_from_url(url: str, content_type: Optional[str]) -> str:
  function trim_filename (line 126) | def trim_filename(filename: str, max_len: int) -> str:
  function get_filename_max_length (line 137) | def get_filename_max_length(directory: str) -> int:
  function trim_filename_if_needed (line 144) | def trim_filename_if_needed(filename: str, directory='.', extra=0) -> str:
  function get_unique_filename (line 151) | def get_unique_filename(filename: str, exists=os.path.exists) -> str:
  class Downloader (line 162) | class Downloader:
    method __init__ (line 164) | def __init__(
    method pre_request (line 186) | def pre_request(self, request_headers: dict):
    method start (line 202) | def start(
    method finish (line 262) | def finish(self):
    method failed (line 267) | def failed(self):
    method interrupted (line 271) | def interrupted(self) -> bool:
    method chunk_downloaded (line 278) | def chunk_downloaded(self, chunk: bytes):
    method _get_output_file_from_response (line 289) | def _get_output_file_from_response(
  class DownloadStatus (line 307) | class DownloadStatus:
    method __init__ (line 310) | def __init__(self, env):
    method started (line 318) | def started(self, output_file, resumed_from=0, total_size=None):
    method start_display (line 325) | def start_display(self, output_file):
    method chunk_downloaded (line 349) | def chunk_downloaded(self, size):
    method has_finished (line 355) | def has_finished(self):
    method time_spent (line 359) | def time_spent(self):
    method finished (line 368) | def finished(self):
    method terminate (line 375) | def terminate(self):

FILE: httpie/encoding.py
  function detect_encoding (line 11) | def detect_encoding(content: ContentBytes) -> str:
  function smart_decode (line 32) | def smart_decode(content: ContentBytes, encoding: str) -> Tuple[str, str]:
  function smart_encode (line 44) | def smart_encode(content: str, encoding: str) -> bytes:

FILE: httpie/internal/daemon_runner.py
  function _check_status (line 12) | def _check_status(env):
  function _parse_options (line 30) | def _parse_options(args: List[str]) -> argparse.Namespace:
  function is_daemon_mode (line 37) | def is_daemon_mode(args: List[str]) -> bool:
  function run_daemon_task (line 41) | def run_daemon_task(env: Environment, args: List[str]) -> ExitStatus:

FILE: httpie/internal/daemons.py
  function _start_process (line 22) | def _start_process(cmd: List[str], **kwargs) -> Popen:
  function _spawn_windows (line 32) | def _spawn_windows(cmd: List[str], process_context: ProcessContext) -> N...
  function _spawn_posix (line 55) | def _spawn_posix(args: List[str], process_context: ProcessContext) -> None:
  function _spawn (line 102) | def _spawn(args: List[str], process_context: ProcessContext) -> None:
  function spawn_daemon (line 112) | def spawn_daemon(task: str) -> None:

FILE: httpie/internal/update_warnings.py
  function _read_data_error_free (line 31) | def _read_data_error_free(file: Path) -> Any:
  function _fetch_updates (line 40) | def _fetch_updates(env: Environment) -> str:
  function fetch_updates (line 55) | def fetch_updates(env: Environment, lazy: bool = True):
  function maybe_fetch_updates (line 62) | def maybe_fetch_updates(env: Environment) -> None:
  function _get_suppress_context (line 78) | def _get_suppress_context(env: Environment) -> Any:
  function _update_checker (line 91) | def _update_checker(
  function _get_update_status (line 107) | def _get_update_status(env: Environment) -> Optional[str]:
  function get_update_status (line 136) | def get_update_status(env: Environment) -> str:
  function check_updates (line 141) | def check_updates(env: Environment) -> None:

FILE: httpie/legacy/v3_1_0_session_cookie_format.py
  function pre_process (line 36) | def pre_process(session: 'Session', cookies: Any) -> List[Dict[str, Any]]:
  function post_process (line 67) | def post_process(
  function fix_layout (line 84) | def fix_layout(session: 'Session', hostname: str, args: argparse.Namespa...

FILE: httpie/legacy/v3_2_0_session_header_format.py
  function pre_process (line 26) | def pre_process(session: 'Session', headers: Any) -> List[Dict[str, Any]]:
  function post_process (line 49) | def post_process(
  function fix_layout (line 67) | def fix_layout(session: 'Session', *args, **kwargs) -> None:

FILE: httpie/manager/__main__.py
  function is_http_command (line 12) | def is_http_command(args: List[Union[str, bytes]], env: Environment) -> ...
  function main (line 32) | def main(args: List[Union[str, bytes]] = sys.argv, env: Environment = En...
  function program (line 51) | def program():

FILE: httpie/manager/cli.py
  function missing_subcommand (line 95) | def missing_subcommand(*args) -> str:
  function generate_subparsers (line 105) | def generate_subparsers(root, parent_parser, definitions, spec):

FILE: httpie/manager/compat.py
  class PipError (line 10) | class PipError(Exception):
    method __init__ (line 13) | def __init__(self, stdout, stderr):
  function _discover_system_pip (line 18) | def _discover_system_pip() -> List[str]:
  function _run_pip_subprocess (line 45) | def _run_pip_subprocess(pip_executable: List[str], args: List[str]) -> b...
  function run_pip (line 62) | def run_pip(args: List[str]) -> bytes:

FILE: httpie/manager/core.py
  function dispatch_cli_task (line 26) | def dispatch_cli_task(env: Environment, action: Optional[str], args: arg...
  function program (line 33) | def program(args: argparse.Namespace, env: Environment) -> ExitStatus:

FILE: httpie/manager/tasks/check_updates.py
  function cli_check_updates (line 7) | def cli_check_updates(env: Environment, args: argparse.Namespace) -> Exi...

FILE: httpie/manager/tasks/export_args.py
  function cli_export_args (line 16) | def cli_export_args(env: Environment, args: argparse.Namespace) -> ExitS...

FILE: httpie/manager/tasks/plugins.py
  class PluginInstaller (line 21) | class PluginInstaller:
    method __init__ (line 23) | def __init__(self, env: Environment, debug: bool = False) -> None:
    method setup_plugins_dir (line 30) | def setup_plugins_dir(self) -> None:
    method fail (line 45) | def fail(
    method _install (line 60) | def _install(self, targets: List[str], mode='install') -> Tuple[
    method install (line 105) | def install(self, targets: List[str]) -> ExitStatus:
    method _clear_metadata (line 111) | def _clear_metadata(self, targets: List[str]) -> None:
    method upgrade (line 132) | def upgrade(self, targets: List[str]) -> ExitStatus:
    method _uninstall (line 148) | def _uninstall(self, target: str) -> Optional[ExitStatus]:
    method uninstall (line 184) | def uninstall(self, targets: List[str]) -> ExitStatus:
    method list (line 196) | def list(self) -> None:
    method run (line 217) | def run(
  function cli_plugins (line 240) | def cli_plugins(env: Environment, args: argparse.Namespace) -> ExitStatus:

FILE: httpie/manager/tasks/sessions.py
  function cli_sessions (line 17) | def cli_sessions(env: Environment, args: argparse.Namespace) -> ExitStatus:
  function upgrade_session (line 30) | def upgrade_session(env: Environment, args: argparse.Namespace, hostname...
  function cli_upgrade_session (line 63) | def cli_upgrade_session(env: Environment, args: argparse.Namespace) -> E...
  function cli_upgrade_all_sessions (line 72) | def cli_upgrade_all_sessions(env: Environment, args: argparse.Namespace)...

FILE: httpie/models.py
  class HTTPMessage (line 23) | class HTTPMessage:
    method __init__ (line 26) | def __init__(self, orig):
    method iter_body (line 29) | def iter_body(self, chunk_size: int) -> Iterable[bytes]:
    method iter_lines (line 33) | def iter_lines(self, chunk_size: int) -> Iterable[bytes]:
    method headers (line 38) | def headers(self) -> str:
    method metadata (line 43) | def metadata(self) -> str:
    method encoding (line 48) | def encoding(self) -> str:
    method content_type (line 53) | def content_type(self) -> str:
  class HTTPResponse (line 61) | class HTTPResponse(HTTPMessage):
    method iter_body (line 64) | def iter_body(self, chunk_size=1):
    method iter_lines (line 67) | def iter_lines(self, chunk_size):
    method headers (line 71) | def headers(self):
    method metadata (line 89) | def metadata(self) -> str:
    method version (line 104) | def version(self) -> str:
  class HTTPRequest (line 130) | class HTTPRequest(HTTPMessage):
    method iter_body (line 133) | def iter_body(self, chunk_size):
    method iter_lines (line 136) | def iter_lines(self, chunk_size):
    method headers (line 140) | def headers(self):
    method body (line 164) | def body(self):
  class RequestsMessageKind (line 175) | class RequestsMessageKind(Enum):
  function infer_requests_message_kind (line 180) | def infer_requests_message_kind(message: RequestsMessage) -> RequestsMes...
  class OutputOptions (line 202) | class OutputOptions(NamedTuple):
    method any (line 208) | def any(self):
    method from_message (line 216) | def from_message(

FILE: httpie/output/formatters/colors.py
  function get_available_styles (line 36) | def get_available_styles():
  class ColorFormatter (line 40) | class ColorFormatter(FormatterPlugin):
    method __init__ (line 51) | def __init__(
    method format_headers (line 81) | def format_headers(self, headers: str) -> str:
    method format_body (line 88) | def format_body(self, body: str, mime: str) -> str:
    method format_metadata (line 98) | def format_metadata(self, metadata: str) -> str:
    method get_lexer_for_body (line 105) | def get_lexer_for_body(
    method get_formatters (line 115) | def get_formatters(self, color_scheme: str) -> Tuple[
    method get_style_class (line 135) | def get_style_class(color_scheme: str) -> Type[pygments.style.Style]:
  function get_lexer (line 142) | def get_lexer(
  class Solarized256Style (line 197) | class Solarized256Style(pygments.style.Style):
  function make_style (line 354) | def make_style(name, raw_styles, shade):
  function make_styles (line 371) | def make_styles():

FILE: httpie/output/formatters/headers.py
  class HeadersFormatter (line 4) | class HeadersFormatter(FormatterPlugin):
    method __init__ (line 6) | def __init__(self, **kwargs):
    method format_headers (line 10) | def format_headers(self, headers: str) -> str:

FILE: httpie/output/formatters/json.py
  class JSONFormatter (line 6) | class JSONFormatter(FormatterPlugin):
    method __init__ (line 8) | def __init__(self, **kwargs):
    method format_body (line 12) | def format_body(self, body: str, mime: str) -> str:

FILE: httpie/output/formatters/xml.py
  function parse_xml (line 14) | def parse_xml(data: str) -> 'Document':
  function parse_declaration (line 20) | def parse_declaration(raw_body: str) -> Optional[str]:
  function pretty_xml (line 29) | def pretty_xml(document: 'Document',
  class XMLFormatter (line 53) | class XMLFormatter(FormatterPlugin):
    method __init__ (line 55) | def __init__(self, **kwargs):
    method format_body (line 59) | def format_body(self, body: str, mime: str):

FILE: httpie/output/lexers/common.py
  function precise (line 1) | def precise(lexer, precise_token, parent_token):

FILE: httpie/output/lexers/http.py
  function http_response_type (line 25) | def http_response_type(lexer, match, ctx):
  function request_method (line 45) | def request_method(lexer, match, ctx):
  class SimplifiedHTTPLexer (line 54) | class SimplifiedHTTPLexer(pygments.lexer.RegexLexer):

FILE: httpie/output/lexers/json.py
  class EnhancedJsonLexer (line 11) | class EnhancedJsonLexer(RegexLexer):

FILE: httpie/output/lexers/metadata.py
  function speed_based_token (line 13) | def speed_based_token(lexer, match, ctx):
  class MetadataLexer (line 33) | class MetadataLexer(pygments.lexer.RegexLexer):

FILE: httpie/output/models.py
  class ProcessingOptions (line 10) | class ProcessingOptions(NamedTuple):
    method get_prettify (line 28) | def get_prettify(self, env: Environment) -> List[str]:
    method from_raw_args (line 35) | def from_raw_args(cls, options: argparse.Namespace) -> 'ProcessingOpti...
    method show_traceback (line 43) | def show_traceback(self):

FILE: httpie/output/processing.py
  function is_valid_mime (line 12) | def is_valid_mime(mime):
  class Conversion (line 16) | class Conversion:
    method get_converter (line 19) | def get_converter(mime: str) -> Optional[ConverterPlugin]:
  class Formatting (line 26) | class Formatting:
    method __init__ (line 29) | def __init__(self, groups: List[str], env=Environment(), **kwargs):
    method format_headers (line 44) | def format_headers(self, headers: str) -> str:
    method format_body (line 49) | def format_body(self, content: str, mime: str) -> str:
    method format_metadata (line 55) | def format_metadata(self, metadata: str) -> str:

FILE: httpie/output/streams.py
  class DataSuppressedError (line 20) | class DataSuppressedError(Exception):
  class BinarySuppressedError (line 24) | class BinarySuppressedError(DataSuppressedError):
  class BaseStream (line 30) | class BaseStream(metaclass=ABCMeta):
    method __init__ (line 33) | def __init__(
    method get_headers (line 51) | def get_headers(self) -> bytes:
    method get_metadata (line 55) | def get_metadata(self) -> bytes:
    method iter_body (line 60) | def iter_body(self) -> Iterable[bytes]:
    method __iter__ (line 63) | def __iter__(self) -> Iterable[bytes]:
  class RawStream (line 88) | class RawStream(BaseStream):
    method __init__ (line 94) | def __init__(self, chunk_size=CHUNK_SIZE, **kwargs):
    method iter_body (line 98) | def iter_body(self) -> Iterable[bytes]:
  class EncodedStream (line 105) | class EncodedStream(BaseStream):
    method __init__ (line 115) | def __init__(
    method iter_body (line 138) | def iter_body(self) -> Iterable[bytes]:
    method decode_chunk (line 145) | def decode_chunk(self, raw_chunk: str) -> str:
    method encoding (line 151) | def encoding(self) -> Optional[str]:
    method encoding (line 166) | def encoding(self, value) -> None:
  class PrettyStream (line 170) | class PrettyStream(EncodedStream):
    method __init__ (line 181) | def __init__(
    method get_headers (line 190) | def get_headers(self) -> bytes:
    method get_metadata (line 194) | def get_metadata(self) -> bytes:
    method iter_body (line 198) | def iter_body(self) -> Iterable[bytes]:
    method process_body (line 219) | def process_body(self, chunk: Union[str, bytes]) -> bytes:
  class BufferedPrettyStream (line 228) | class BufferedPrettyStream(PrettyStream):
    method iter_body (line 238) | def iter_body(self) -> Iterable[bytes]:

FILE: httpie/output/ui/man_pages.py
  function is_available (line 16) | def is_available(program: str) -> bool:
  function display_for (line 39) | def display_for(env: Environment, program: str) -> None:

FILE: httpie/output/ui/palette.py
  class Styles (line 11) | class Styles(Enum):
  class PieStyle (line 16) | class PieStyle(str, Enum):
  class ColorString (line 32) | class ColorString(str):
    method __or__ (line 33) | def __or__(self, other: str) -> 'ColorString':
  class PieColor (line 55) | class PieColor(ColorString, Enum):
  class GenericColor (line 74) | class GenericColor(Enum):
    method apply_style (line 91) | def apply_style(
  class _StyledGenericColor (line 105) | class _StyledGenericColor:
  function boldify (line 255) | def boldify(color: PieColor) -> str:
  function get_color (line 260) | def get_color(

FILE: httpie/output/ui/rich_help.py
  class OptionsHighlighter (line 44) | class OptionsHighlighter(RegexHighlighter):
  function unpack_argument (line 54) | def unpack_argument(
  function to_usage (line 72) | def to_usage(
  function to_help_message (line 128) | def to_help_message(

FILE: httpie/output/ui/rich_palette.py
  class _GenericColorCaster (line 26) | class _GenericColorCaster(dict):
    method _translate (line 32) | def _translate(self, key: Any) -> Any:
    method __getitem__ (line 38) | def __getitem__(self, key: Any) -> Any:
    method get (line 41) | def get(self, key: Any) -> Any:
  function _make_rich_color_theme (line 45) | def _make_rich_color_theme(style_name: Optional[str] = None) -> 'Theme':

FILE: httpie/output/ui/rich_progress.py
  class BaseDisplay (line 11) | class BaseDisplay:
    method start (line 14) | def start(
    method update (line 19) | def update(self, steps: float) -> None:
    method stop (line 22) | def stop(self, time_spent: float) -> None:
    method console (line 26) | def console(self) -> 'Console':
    method _print_summary (line 30) | def _print_summary(
  class DummyDisplay (line 55) | class DummyDisplay(BaseDisplay):
  class StatusDisplay (line 62) | class StatusDisplay(BaseDisplay):
    method start (line 63) | def start(
    method update (line 74) | def update(self, steps: float) -> None:
    method stop (line 86) | def stop(self, time_spent: float) -> None:
  class ProgressDisplay (line 97) | class ProgressDisplay(BaseDisplay):
    method start (line 98) | def start(
    method update (line 129) | def update(self, steps: float) -> None:
    method stop (line 132) | def stop(self, time_spent: Optional[float]) -> None:

FILE: httpie/output/ui/rich_utils.py
  function render_as_string (line 12) | def render_as_string(renderable: RenderableType) -> str:
  function enable_highlighter (line 23) | def enable_highlighter(

FILE: httpie/output/utils.py
  function load_prefixed_json (line 9) | def load_prefixed_json(data: str) -> Tuple[str, json.JSONDecoder]:
  function parse_prefixed_json (line 27) | def parse_prefixed_json(data: str) -> Tuple[str, str]:

FILE: httpie/output/writer.py
  function write_message (line 27) | def write_message(
  function write_stream (line 61) | def write_stream(
  function write_stream_with_colors_win (line 79) | def write_stream_with_colors_win(
  function write_raw_data (line 100) | def write_raw_data(
  function build_output_stream_for_message (line 122) | def build_output_stream_for_message(
  function get_stream_type_and_kwargs (line 153) | def get_stream_type_and_kwargs(

FILE: httpie/plugins/base.py
  class BasePlugin (line 4) | class BasePlugin:
  class AuthPlugin (line 16) | class AuthPlugin(BasePlugin):
    method get_auth (line 58) | def get_auth(self, username: str = None, password: str = None):
  class TransportPlugin (line 72) | class TransportPlugin(BasePlugin):
    method get_adapter (line 87) | def get_adapter(self):
  class ConverterPlugin (line 96) | class ConverterPlugin(BasePlugin):
    method __init__ (line 106) | def __init__(self, mime: str):
    method convert (line 109) | def convert(self, body: bytes) -> Tuple[str, str]:
    method supports (line 120) | def supports(cls, mime: str) -> bool:
  class FormatterPlugin (line 124) | class FormatterPlugin(BasePlugin):
    method __init__ (line 131) | def __init__(self, **kwargs):
    method format_headers (line 142) | def format_headers(self, headers: str) -> str:
    method format_body (line 150) | def format_body(self, content: str, mime: str) -> str:
    method format_metadata (line 159) | def format_metadata(self, metadata: str) -> str:

FILE: httpie/plugins/builtin.py
  class BuiltinAuthPlugin (line 9) | class BuiltinAuthPlugin(AuthPlugin):
  class HTTPBasicAuth (line 13) | class HTTPBasicAuth(requests.auth.HTTPBasicAuth):
    method __call__ (line 15) | def __call__(
    method make_header (line 31) | def make_header(username: str, password: str) -> str:
  class HTTPBearerAuth (line 37) | class HTTPBearerAuth(requests.auth.AuthBase):
    method __init__ (line 39) | def __init__(self, token: str) -> None:
    method __call__ (line 42) | def __call__(self, request: requests.PreparedRequest) -> requests.Prep...
  class BasicAuthPlugin (line 47) | class BasicAuthPlugin(BuiltinAuthPlugin):
    method get_auth (line 53) | def get_auth(self, username: str, password: str) -> HTTPBasicAuth:
  class DigestAuthPlugin (line 57) | class DigestAuthPlugin(BuiltinAuthPlugin):
    method get_auth (line 63) | def get_auth(
  class BearerAuthPlugin (line 71) | class BearerAuthPlugin(BuiltinAuthPlugin):
    method get_auth (line 78) | def get_auth(self, **kwargs) -> requests.auth.HTTPDigestAuth:

FILE: httpie/plugins/manager.py
  function _load_directories (line 28) | def _load_directories(site_dirs: Iterable[Path]) -> Iterator[None]:
  function enable_plugins (line 41) | def enable_plugins(plugins_dir: Optional[Path]) -> ContextManager[None]:
  class PluginManager (line 48) | class PluginManager(list):
    method register (line 49) | def register(self, *plugins: Type[BasePlugin]):
    method unregister (line 53) | def unregister(self, plugin: Type[BasePlugin]):
    method filter (line 56) | def filter(self, by_type=Type[BasePlugin]):
    method iter_entry_points (line 59) | def iter_entry_points(self, directory: Optional[Path] = None):
    method load_installed_plugins (line 66) | def load_installed_plugins(self, directory: Optional[Path] = None):
    method get_auth_plugins (line 83) | def get_auth_plugins(self) -> List[Type[AuthPlugin]]:
    method get_auth_plugin_mapping (line 86) | def get_auth_plugin_mapping(self) -> Dict[str, Type[AuthPlugin]]:
    method get_auth_plugin (line 91) | def get_auth_plugin(self, auth_type: str) -> Type[AuthPlugin]:
    method get_formatters (line 95) | def get_formatters(self) -> List[Type[FormatterPlugin]]:
    method get_formatters_grouped (line 98) | def get_formatters_grouped(self) -> Dict[str, List[Type[FormatterPlugi...
    method get_converters (line 105) | def get_converters(self) -> List[Type[ConverterPlugin]]:
    method get_transport_plugins (line 109) | def get_transport_plugins(self) -> List[Type[TransportPlugin]]:
    method __str__ (line 112) | def __str__(self):
    method __repr__ (line 120) | def __repr__(self):

FILE: httpie/sessions.py
  function is_anonymous_session (line 42) | def is_anonymous_session(session_name: str) -> bool:
  function session_hostname_to_dirname (line 46) | def session_hostname_to_dirname(hostname: str, session_name: str) -> str:
  function strip_port (line 56) | def strip_port(hostname: str) -> str:
  function materialize_cookie (line 60) | def materialize_cookie(cookie: Cookie) -> Dict[str, Any]:
  function materialize_cookies (line 75) | def materialize_cookies(jar: RequestsCookieJar) -> List[Dict[str, Any]]:
  function materialize_headers (line 82) | def materialize_headers(headers: Dict[str, str]) -> List[Dict[str, Any]]:
  function get_httpie_session (line 92) | def get_httpie_session(
  class Session (line 124) | class Session(BaseConfigDict):
    method __init__ (line 128) | def __init__(
    method _add_cookies (line 158) | def _add_cookies(self, cookies: List[Dict[str, Any]]) -> None:
    method pre_process_data (line 170) | def pre_process_data(self, data: Dict[str, Any]) -> Dict[str, Any]:
    method post_process_data (line 185) | def post_process_data(self, data: Dict[str, Any]) -> Dict[str, Any]:
    method _compute_new_headers (line 200) | def _compute_new_headers(self, request_headers: HTTPHeadersDict) -> HT...
    method update_headers (line 230) | def update_headers(self, request_headers: HTTPHeadersDict):
    method headers (line 251) | def headers(self) -> HTTPHeadersDict:
    method cookies (line 255) | def cookies(self) -> RequestsCookieJar:
    method cookies (line 260) | def cookies(self, jar: RequestsCookieJar):
    method remove_cookies (line 263) | def remove_cookies(self, cookies: List[Dict[str, str]]):
    method auth (line 273) | def auth(self) -> Optional[AuthBase]:
    method auth (line 302) | def auth(self, auth: dict):
    method is_anonymous (line 307) | def is_anonymous(self):
    method warn_legacy_usage (line 310) | def warn_legacy_usage(self, warning: str) -> None:

FILE: httpie/ssl_.py
  class HTTPieCertificate (line 29) | class HTTPieCertificate(NamedTuple):
    method to_raw_cert (line 34) | def to_raw_cert(self):
  class HTTPieHTTPSAdapter (line 40) | class HTTPieHTTPSAdapter(HTTPAdapter):
    method __init__ (line 41) | def __init__(
    method init_poolmanager (line 55) | def init_poolmanager(self, *args, **kwargs):
    method proxy_manager_for (line 59) | def proxy_manager_for(self, *args, **kwargs):
    method cert_verify (line 63) | def cert_verify(self, conn, url, verify, cert):
    method _create_ssl_context (line 71) | def _create_ssl_context(
    method get_default_ciphers_names (line 88) | def get_default_ciphers_names(cls):
  function _is_key_file_encrypted (line 92) | def _is_key_file_encrypted(key_file):

FILE: httpie/status.py
  class ExitStatus (line 5) | class ExitStatus(IntEnum):
  function http_status_to_exit_status (line 23) | def http_status_to_exit_status(http_status: int, follow=False) -> ExitSt...

FILE: httpie/uploads.py
  class ChunkedStream (line 20) | class ChunkedStream:
    method __iter__ (line 21) | def __iter__(self) -> Iterable[Union[str, bytes]]:
  class ChunkedUploadStream (line 25) | class ChunkedUploadStream(ChunkedStream):
    method __init__ (line 26) | def __init__(
    method __iter__ (line 36) | def __iter__(self) -> Iterable[Union[str, bytes]]:
  class ChunkedMultipartUploadStream (line 44) | class ChunkedMultipartUploadStream(ChunkedStream):
    method __init__ (line 47) | def __init__(
    method __iter__ (line 55) | def __iter__(self) -> Iterable[Union[str, bytes]]:
  function as_bytes (line 65) | def as_bytes(data: Union[str, bytes]) -> bytes:
  function _wrap_function_with_callback (line 75) | def _wrap_function_with_callback(
  function is_stdin (line 87) | def is_stdin(file: IO) -> bool:
  function observe_stdin_for_data_thread (line 99) | def observe_stdin_for_data_thread(env: Environment, file: IO, read_event...
  function _read_file_with_selectors (line 130) | def _read_file_with_selectors(file: IO, read_event: threading.Event) -> ...
  function _prepare_file_for_upload (line 146) | def _prepare_file_for_upload(
  function prepare_request_body (line 191) | def prepare_request_body(
  function get_multipart_data_and_content_type (line 230) | def get_multipart_data_and_content_type(
  function compress_request (line 252) | def compress_request(

FILE: httpie/utils.py
  class JsonDictPreservingDuplicateKeys (line 27) | class JsonDictPreservingDuplicateKeys(OrderedDict):
    method __init__ (line 36) | def __init__(self, items: Items):
    method _ensure_items_used (line 40) | def _ensure_items_used(self) -> None:
    method items (line 65) | def items(self) -> Items:
  function load_json_preserve_order_and_dupe_keys (line 72) | def load_json_preserve_order_and_dupe_keys(s):
  function repr_dict (line 76) | def repr_dict(d: dict) -> str:
  function humanize_bytes (line 80) | def humanize_bytes(n, precision=2):
  class ExplicitNullAuth (line 124) | class ExplicitNullAuth(requests.auth.AuthBase):
    method __call__ (line 129) | def __call__(self, r):
  function get_content_type (line 133) | def get_content_type(filename):
  function split_cookies (line 143) | def split_cookies(cookies):
  function get_expired_cookies (line 156) | def get_expired_cookies(
  function _max_age_to_expires (line 188) | def _max_age_to_expires(cookies, now):
  function parse_content_type_header (line 203) | def parse_content_type_header(header):
  function as_site (line 221) | def as_site(path: Path, **extra_vars) -> Path:
  function get_site_paths (line 229) | def get_site_paths(path: Path) -> Iterable[Path]:
  function split_iterable (line 248) | def split_iterable(iterable: Iterable[T], key: Callable[[T], bool]) -> T...
  function unwrap_context (line 258) | def unwrap_context(exc: Exception) -> Optional[Exception]:
  function url_as_host (line 266) | def url_as_host(url: str) -> str:
  class LockFileError (line 270) | class LockFileError(ValueError):
  function open_with_lockfile (line 275) | def open_with_lockfile(file: Path, *args, **kwargs) -> Generator[IO[Any]...
  function is_version_greater (line 293) | def is_version_greater(version_1: str, version_2: str) -> bool:

FILE: tests/conftest.py
  function httpbin_add_ca_bundle (line 30) | def httpbin_add_ca_bundle(monkeypatch):
  function httpbin_secure_untrusted (line 41) | def httpbin_secure_untrusted(monkeypatch, httpbin_secure):
  function _httpbin_with_chunked_support_available (line 52) | def _httpbin_with_chunked_support_available():
  function httpbin_with_chunked_support (line 61) | def httpbin_with_chunked_support(_httpbin_with_chunked_support_available):
  function _remote_httpbin_available (line 68) | def _remote_httpbin_available():
  function remote_httpbin (line 77) | def remote_httpbin(_remote_httpbin_available):
  function pyopenssl_inject (line 84) | def pyopenssl_inject():

FILE: tests/fixtures/__init__.py
  function patharg (line 11) | def patharg(path):
  function read_session_file (line 58) | def read_session_file(session_file: Path, *, extra_variables: Optional[D...

FILE: tests/test_auth.py
  function test_basic_auth (line 13) | def test_basic_auth(httpbin_both):
  function test_digest_auth (line 21) | def test_digest_auth(httpbin_both, argument_name):
  function test_bearer_auth (line 33) | def test_bearer_auth(httpbin_both, token):
  function test_password_prompt (line 43) | def test_password_prompt(httpbin):
  function test_credentials_in_url (line 50) | def test_credentials_in_url(httpbin_both):
  function test_credentials_in_url_auth_flag_has_priority (line 58) | def test_credentials_in_url_auth_flag_has_priority(httpbin_both):
  function test_only_username_in_url (line 72) | def test_only_username_in_url(url):
  function test_missing_auth (line 83) | def test_missing_auth(httpbin):
  function test_netrc (line 94) | def test_netrc(httpbin_both):
  function test_ignore_netrc (line 104) | def test_ignore_netrc(httpbin_both):
  function test_ignore_netrc_together_with_auth (line 112) | def test_ignore_netrc_together_with_auth():
  function test_ignore_netrc_with_auth_type_resulting_in_missing_auth (line 120) | def test_ignore_netrc_with_auth_type_resulting_in_missing_auth(httpbin):
  function test_auth_plugin_netrc_parse (line 141) | def test_auth_plugin_netrc_parse(auth_type, endpoint, httpbin):
  function test_ignore_netrc_null_auth (line 150) | def test_ignore_netrc_null_auth():

FILE: tests/test_auth_plugins.py
  function basic_auth (line 20) | def basic_auth(header=BASIC_AUTH_HEADER_VALUE):
  function test_auth_plugin_parse_auth_false (line 29) | def test_auth_plugin_parse_auth_false(httpbin):
  function test_auth_plugin_require_auth_false (line 56) | def test_auth_plugin_require_auth_false(httpbin):
  function test_auth_plugin_require_auth_false_and_auth_provided (line 81) | def test_auth_plugin_require_auth_false_and_auth_provided(httpbin):
  function test_auth_plugin_prompt_password_false (line 110) | def test_auth_plugin_prompt_password_false(httpbin):

FILE: tests/test_binary.py
  class TestBinaryRequestData (line 9) | class TestBinaryRequestData:
    method test_binary_stdin (line 11) | def test_binary_stdin(self, httpbin):
    method test_binary_file_path (line 21) | def test_binary_file_path(self, httpbin):
    method test_binary_file_form (line 27) | def test_binary_file_form(self, httpbin):
  class TestBinaryResponseData (line 34) | class TestBinaryResponseData:
    method test_binary_suppresses_when_terminal (line 36) | def test_binary_suppresses_when_terminal(self, httpbin):
    method test_binary_suppresses_when_not_terminal_but_pretty (line 40) | def test_binary_suppresses_when_not_terminal_but_pretty(self, httpbin):
    method test_binary_included_and_correct_when_suitable (line 45) | def test_binary_included_and_correct_when_suitable(self, httpbin):

FILE: tests/test_cli.py
  class TestItemParsing (line 22) | class TestItemParsing:
    method test_invalid_items (line 25) | def test_invalid_items(self):
    method test_escape_separator (line 30) | def test_escape_separator(self):
    method test_backslash_before_non_special_character_does_not_escape (line 59) | def test_backslash_before_non_special_character_does_not_escape(
    method test_escape_longsep (line 66) | def test_escape_longsep(self):
    method test_valid_items (line 74) | def test_valid_items(self):
    method test_multiple_file_fields_with_same_field_name (line 130) | def test_multiple_file_fields_with_same_field_name(self):
    method test_multiple_text_fields_with_same_field_name (line 137) | def test_multiple_text_fields_with_same_field_name(self):
  class TestQuerystring (line 152) | class TestQuerystring:
    method test_query_string_params_in_url (line 153) | def test_query_string_params_in_url(self, httpbin):
    method test_query_string_params_items (line 161) | def test_query_string_params_items(self, httpbin):
    method test_query_string_params_in_url_and_items_with_duplicates (line 169) | def test_query_string_params_in_url_and_items_with_duplicates(self,
  function test_url_leading_colon_slash_slash (line 184) | def test_url_leading_colon_slash_slash(program_name, url_arg, parsed_url):
  function test_url_colon_slash_slash_only (line 190) | def test_url_colon_slash_slash_only():
  class TestLocalhostShorthand (line 195) | class TestLocalhostShorthand:
    method test_expand_localhost_shorthand (line 196) | def test_expand_localhost_shorthand(self):
    method test_expand_localhost_shorthand_with_slash (line 200) | def test_expand_localhost_shorthand_with_slash(self):
    method test_expand_localhost_shorthand_with_port (line 204) | def test_expand_localhost_shorthand_with_port(self):
    method test_expand_localhost_shorthand_with_path (line 208) | def test_expand_localhost_shorthand_with_path(self):
    method test_expand_localhost_shorthand_with_port_and_slash (line 212) | def test_expand_localhost_shorthand_with_port_and_slash(self):
    method test_expand_localhost_shorthand_with_port_and_path (line 216) | def test_expand_localhost_shorthand_with_port_and_path(self):
    method test_dont_expand_shorthand_ipv6_as_shorthand (line 220) | def test_dont_expand_shorthand_ipv6_as_shorthand(self):
    method test_dont_expand_longer_ipv6_as_shorthand (line 224) | def test_dont_expand_longer_ipv6_as_shorthand(self):
    method test_dont_expand_full_ipv6_as_shorthand (line 231) | def test_dont_expand_full_ipv6_as_shorthand(self):
  class TestArgumentParser (line 239) | class TestArgumentParser:
    method setup_method (line 241) | def setup_method(self, method):
    method test_guess_when_method_set_and_valid (line 244) | def test_guess_when_method_set_and_valid(self):
    method test_guess_when_method_not_set (line 256) | def test_guess_when_method_not_set(self):
    method test_guess_when_method_set_but_invalid_and_data_field (line 268) | def test_guess_when_method_set_but_invalid_and_data_field(self):
    method test_guess_when_method_set_but_invalid_and_header_field (line 285) | def test_guess_when_method_set_but_invalid_and_header_field(self):
    method test_guess_when_method_set_but_invalid_and_item_exists (line 302) | def test_guess_when_method_set_but_invalid_and_item_exists(self):
  class TestNoOptions (line 320) | class TestNoOptions:
    method test_valid_no_options (line 322) | def test_valid_no_options(self, httpbin):
    method test_invalid_no_options (line 326) | def test_invalid_no_options(self, httpbin):
  class TestStdin (line 334) | class TestStdin:
    method test_ignore_stdin (line 336) | def test_ignore_stdin(self, httpbin):
    method test_ignore_stdin_cannot_prompt_password (line 346) | def test_ignore_stdin_cannot_prompt_password(self, httpbin):
    method test_stdin_closed (line 352) | def test_stdin_closed(self, httpbin):
  class TestSchemes (line 357) | class TestSchemes:
    method test_invalid_custom_scheme (line 359) | def test_invalid_custom_scheme(self):
    method test_invalid_scheme_via_via_default_scheme (line 365) | def test_invalid_scheme_via_via_default_scheme(self):
    method test_default_scheme_option (line 371) | def test_default_scheme_option(self, httpbin_secure):
    method test_scheme_when_invoked_as_https (line 375) | def test_scheme_when_invoked_as_https(self, httpbin_secure):

FILE: tests/test_cli_ui.py
  function ignore_terminal_size (line 38) | def ignore_terminal_size(monkeypatch):
  function test_naked_invocation (line 63) | def test_naked_invocation(ignore_terminal_size, args, expected_msg):

FILE: tests/test_cli_utils.py
  function test_lazy_choices (line 7) | def test_lazy_choices():
  function test_lazy_choices_help (line 52) | def test_lazy_choices_help():

FILE: tests/test_compress.py
  function assert_decompressed_equal (line 19) | def assert_decompressed_equal(base64_compressed_data, expected_str):
  function test_cannot_combine_compress_with_chunked (line 31) | def test_cannot_combine_compress_with_chunked(httpbin):
  function test_cannot_combine_compress_with_multipart (line 38) | def test_cannot_combine_compress_with_multipart(httpbin):
  function test_compress_skip_negative_ratio (line 45) | def test_compress_skip_negative_ratio(httpbin_both):
  function test_compress_force_with_negative_ratio (line 56) | def test_compress_force_with_negative_ratio(httpbin_both):
  function test_compress_json (line 68) | def test_compress_json(httpbin_both):
  function test_compress_form (line 81) | def test_compress_form(httpbin_both):
  function test_compress_raw (line 95) | def test_compress_raw(httpbin_both):
  function test_compress_stdin (line 108) | def test_compress_stdin(httpbin_both):
  function test_compress_file (line 126) | def test_compress_file(httpbin_both):

FILE: tests/test_config.py
  function test_default_options (line 16) | def test_default_options(httpbin):
  function test_config_file_not_valid (line 26) | def test_config_file_not_valid(httpbin):
  function test_config_file_inaccessible (line 37) | def test_config_file_inaccessible(httpbin):
  function test_default_options_overwrite (line 50) | def test_default_options_overwrite(httpbin):
  function test_explicit_xdg_config_home (line 61) | def test_explicit_xdg_config_home(monkeypatch: MonkeyPatch, tmp_path: Pa...
  function test_default_xdg_config_home (line 72) | def test_default_xdg_config_home(monkeypatch: MonkeyPatch, tmp_path: Path):
  function test_legacy_config_dir (line 86) | def test_legacy_config_dir(monkeypatch: MonkeyPatch, tmp_path: Path):
  function test_custom_config_dir (line 95) | def test_custom_config_dir(monkeypatch: MonkeyPatch, tmp_path: Path):
  function test_windows_config_dir (line 102) | def test_windows_config_dir(monkeypatch: MonkeyPatch):

FILE: tests/test_cookie.py
  class TestIntegration (line 8) | class TestIntegration:
    method setup_mock_server (line 10) | def setup_mock_server(self, handler):
    method test_cookie_parser (line 22) | def test_cookie_parser(self):

FILE: tests/test_cookie_on_redirects.py
  function test_explicit_user_set_cookie (line 9) | def test_explicit_user_set_cookie(httpbin, target_httpbin, request):
  function test_explicit_user_set_cookie_in_session (line 25) | def test_explicit_user_set_cookie_in_session(tmp_path, httpbin, target_h...
  function test_saved_user_set_cookie_in_session (line 43) | def test_saved_user_set_cookie_in_session(tmp_path, httpbin, target_http...
  function test_explicit_user_set_headers (line 68) | def test_explicit_user_set_headers(httpbin, tmp_path, target_httpbin, se...
  function test_server_set_cookie_on_redirect_same_domain (line 91) | def test_server_set_cookie_on_redirect_same_domain(tmp_path, httpbin, se...
  function test_server_set_cookie_on_redirect_different_domain (line 108) | def test_server_set_cookie_on_redirect_different_domain(tmp_path, http_s...
  function test_saved_session_cookies_on_same_domain (line 129) | def test_saved_session_cookies_on_same_domain(tmp_path, httpbin):
  function test_saved_session_cookies_on_different_domain (line 144) | def test_saved_session_cookies_on_different_domain(tmp_path, httpbin, re...
  function test_saved_session_cookies_on_redirect (line 197) | def test_saved_session_cookies_on_redirect(
  function test_saved_session_cookie_pool (line 221) | def test_saved_session_cookie_pool(tmp_path, httpbin, remote_httpbin):

FILE: tests/test_defaults.py
  function test_default_headers_case_insensitive (line 12) | def test_default_headers_case_insensitive(httpbin):
  class TestImplicitHTTPMethod (line 28) | class TestImplicitHTTPMethod:
    method test_implicit_GET (line 29) | def test_implicit_GET(self, httpbin):
    method test_implicit_GET_with_headers (line 33) | def test_implicit_GET_with_headers(self, httpbin):
    method test_implicit_POST_json (line 38) | def test_implicit_POST_json(self, httpbin):
    method test_implicit_POST_form (line 43) | def test_implicit_POST_form(self, httpbin):
    method test_implicit_POST_raw (line 48) | def test_implicit_POST_raw(self, httpbin):
    method test_implicit_POST_stdin (line 53) | def test_implicit_POST_stdin(self, httpbin):
  class TestAutoContentTypeAndAcceptHeaders (line 62) | class TestAutoContentTypeAndAcceptHeaders:
    method test_GET_no_data_no_auto_headers (line 70) | def test_GET_no_data_no_auto_headers(self, httpbin):
    method test_POST_no_data_no_auto_headers (line 77) | def test_POST_no_data_no_auto_headers(self, httpbin):
    method test_POST_with_data_auto_JSON_headers (line 84) | def test_POST_with_data_auto_JSON_headers(self, httpbin):
    method test_GET_with_data_auto_JSON_headers (line 90) | def test_GET_with_data_auto_JSON_headers(self, httpbin):
    method test_POST_explicit_JSON_JSON_ACCEPT (line 97) | def test_POST_explicit_JSON_JSON_ACCEPT(self, httpbin):
    method test_GET_explicit_JSON_explicit_headers (line 105) | def test_GET_explicit_JSON_explicit_headers(self, httpbin):
    method test_POST_form_auto_Content_Type (line 113) | def test_POST_form_auto_Content_Type(self, httpbin):
    method test_POST_form_Content_Type_override (line 118) | def test_POST_form_Content_Type_override(self, httpbin):
    method test_print_only_body_when_stdout_redirected_by_default (line 124) | def test_print_only_body_when_stdout_redirected_by_default(self, httpb...
    method test_print_overridable_when_stdout_redirected (line 129) | def test_print_overridable_when_stdout_redirected(self, httpbin):

FILE: tests/test_downloads.py
  class Response (line 18) | class Response(requests.Response):
    method __init__ (line 20) | def __init__(self, url, headers={}, status_code=200):
  class TestDownloadUtils (line 26) | class TestDownloadUtils:
    method test_Content_Range_parsing (line 28) | def test_Content_Range_parsing(self):
    method test_Content_Disposition_parsing (line 60) | def test_Content_Disposition_parsing(self, header, expected_filename):
    method test_filename_from_url (line 63) | def test_filename_from_url(self):
    method test_unique_filename (line 102) | def test_unique_filename(self, get_filename_max_length,
  class TestDownloads (line 123) | class TestDownloads:
    method test_actual_download (line 125) | def test_actual_download(self, httpbin_both, httpbin):
    method test_download_with_Content_Length (line 133) | def test_download_with_Content_Length(self, mock_env, httpbin_both):
    method test_download_no_Content_Length (line 150) | def test_download_no_Content_Length(self, mock_env, httpbin_both):
    method test_download_output_from_content_disposition (line 162) | def test_download_output_from_content_disposition(self, mock_env, http...
    method test_download_interrupted (line 190) | def test_download_interrupted(self, mock_env, httpbin_both):
    method test_download_resumed (line 204) | def test_download_resumed(self, mock_env, httpbin_both):
    method test_download_with_redirect_original_url_used_for_filename (line 250) | def test_download_with_redirect_original_url_used_for_filename(self, h...

FILE: tests/test_encoding.py
  function test_charset_text_pairs (line 23) | def test_charset_text_pairs():
  function test_unicode_headers (line 32) | def test_unicode_headers(httpbin):
  function test_unicode_headers_verbose (line 38) | def test_unicode_headers_verbose(httpbin):
  function test_unicode_raw (line 45) | def test_unicode_raw(httpbin):
  function test_unicode_raw_verbose (line 51) | def test_unicode_raw_verbose(httpbin):
  function test_unicode_form_item (line 58) | def test_unicode_form_item(httpbin):
  function test_unicode_form_item_verbose (line 64) | def test_unicode_form_item_verbose(httpbin):
  function test_unicode_json_item (line 71) | def test_unicode_json_item(httpbin):
  function test_unicode_json_item_verbose (line 77) | def test_unicode_json_item_verbose(httpbin):
  function test_unicode_raw_json_item (line 84) | def test_unicode_raw_json_item(httpbin):
  function test_unicode_raw_json_item_verbose (line 91) | def test_unicode_raw_json_item_verbose(httpbin):
  function test_unicode_url_query_arg_item (line 98) | def test_unicode_url_query_arg_item(httpbin):
  function test_unicode_url_query_arg_item_verbose (line 104) | def test_unicode_url_query_arg_item_verbose(httpbin):
  function test_unicode_url (line 110) | def test_unicode_url(httpbin):
  function test_unicode_url_verbose (line 116) | def test_unicode_url_verbose(httpbin):
  function test_unicode_basic_auth (line 122) | def test_unicode_basic_auth(httpbin):
  function test_unicode_digest_auth (line 129) | def test_unicode_digest_auth(httpbin):
  function test_terminal_output_response_charset_detection (line 139) | def test_terminal_output_response_charset_detection(text, charset):
  function test_terminal_output_response_content_type_charset (line 152) | def test_terminal_output_response_content_type_charset(charset, text):
  function test_terminal_output_response_content_type_charset_with_stream (line 166) | def test_terminal_output_response_content_type_charset_with_stream(chars...
  function test_terminal_output_response_charset_override (line 181) | def test_terminal_output_response_charset_override(charset, text, pretty):
  function test_terminal_output_request_content_type_charset (line 198) | def test_terminal_output_request_content_type_charset(charset, text):
  function test_terminal_output_request_charset_detection (line 212) | def test_terminal_output_request_charset_detection(charset, text):

FILE: tests/test_errors.py
  function test_error (line 13) | def test_error(program):
  function test_error_traceback (line 28) | def test_error_traceback(program):
  function test_error_custom_dns (line 41) | def test_error_custom_dns(program, error_code, expected_message):
  function test_max_headers_limit (line 51) | def test_max_headers_limit(httpbin_both):
  function test_max_headers_no_limit (line 57) | def test_max_headers_no_limit(httpbin_both):
  function test_response_charset_option_unknown_encoding (line 61) | def test_response_charset_option_unknown_encoding(httpbin_both):
  function test_response_mime_option_invalid_mime_type (line 70) | def test_response_mime_option_invalid_mime_type(httpbin_both):

FILE: tests/test_exit_status.py
  function test_keyboard_interrupt_during_arg_parsing_exit_status (line 7) | def test_keyboard_interrupt_during_arg_parsing_exit_status(httpbin):
  function test_keyboard_interrupt_in_program_exit_status (line 14) | def test_keyboard_interrupt_in_program_exit_status(httpbin):
  function test_ok_response_exits_0 (line 21) | def test_ok_response_exits_0(httpbin):
  function test_error_response_exits_0_without_check_status (line 27) | def test_error_response_exits_0_without_check_status(httpbin):
  function test_timeout_exit_status (line 34) | def test_timeout_exit_status(httpbin):
  function test_3xx_check_status_exits_3_and_stderr_when_stdout_redirected (line 41) | def test_3xx_check_status_exits_3_and_stderr_when_stdout_redirected(
  function test_3xx_check_status_redirects_allowed_exits_0 (line 52) | def test_3xx_check_status_redirects_allowed_exits_0(httpbin):
  function test_4xx_check_status_exits_4 (line 61) | def test_4xx_check_status_exits_4(httpbin):
  function test_5xx_check_status_exits_5 (line 70) | def test_5xx_check_status_exits_5(httpbin):

FILE: tests/test_httpie.py
  function test_main_entry_point (line 17) | def test_main_entry_point():
  function test_main_entry_point_keyboard_interrupt (line 24) | def test_main_entry_point_keyboard_interrupt(main):
  function test_debug (line 30) | def test_debug():
  function test_help (line 36) | def test_help():
  function test_version (line 42) | def test_version():
  function test_GET (line 48) | def test_GET(httpbin_both):
  function test_path_dot_normalization (line 53) | def test_path_dot_normalization():
  function test_path_as_is (line 62) | def test_path_as_is():
  function test_DELETE (line 72) | def test_DELETE(httpbin_both):
  function test_PUT (line 77) | def test_PUT(httpbin_both):
  function test_POST_JSON_data (line 83) | def test_POST_JSON_data(httpbin_both):
  function test_POST_form (line 89) | def test_POST_form(httpbin_both):
  function test_POST_form_multiple_values (line 95) | def test_POST_form_multiple_values(httpbin_both):
  function test_POST_raw (line 103) | def test_POST_raw(httpbin_both):
  function test_POST_stdin (line 109) | def test_POST_stdin(httpbin_both):
  function test_POST_file (line 119) | def test_POST_file(httpbin_both):
  function test_form_POST_file_redirected_stdin (line 125) | def test_form_POST_file_redirected_stdin(httpbin):
  function test_raw_POST_key_values_supplied (line 146) | def test_raw_POST_key_values_supplied(httpbin):
  function test_raw_POST_redirected_stdin (line 159) | def test_raw_POST_redirected_stdin(httpbin):
  function test_headers (line 175) | def test_headers(httpbin_both):
  function test_headers_unset (line 182) | def test_headers_unset(httpbin_both):
  function test_unset_host_header (line 191) | def test_unset_host_header(httpbin_both):
  function test_unset_useragent_header (line 199) | def test_unset_useragent_header(httpbin_both):
  function test_headers_empty_value (line 207) | def test_headers_empty_value(httpbin_both):
  function test_headers_empty_value_with_value_gives_error (line 215) | def test_headers_empty_value_with_value_gives_error(httpbin):
  function test_headers_omit (line 220) | def test_headers_omit(httpbin_both):
  function test_headers_multiple_omit (line 225) | def test_headers_multiple_omit(httpbin_both):
  function test_headers_same_after_omit (line 233) | def test_headers_same_after_omit(httpbin_both):
  function test_headers_fully_omit (line 239) | def test_headers_fully_omit(httpbin_both):
  function test_headers_multiple_values (line 245) | def test_headers_multiple_values(httpbin_both):
  function test_headers_multiple_values_repeated (line 250) | def test_headers_multiple_values_repeated(httpbin_both):
  function test_headers_multiple_values_with_empty (line 270) | def test_headers_multiple_values_with_empty(httpbin_both, headers, expec...
  function test_headers_multiple_values_mixed (line 275) | def test_headers_multiple_values_mixed(httpbin_both):
  function test_headers_preserve_prepared_headers (line 282) | def test_headers_preserve_prepared_headers(httpbin_both):
  function test_headers_multiple_headers_representation (line 289) | def test_headers_multiple_headers_representation(httpbin_both, pretty):
  function test_response_headers_multiple (line 302) | def test_response_headers_multiple(http_server):
  function test_response_headers_multiple_repeated (line 308) | def test_response_headers_multiple_repeated(http_server):
  function test_response_headers_multiple_representation (line 316) | def test_response_headers_multiple_representation(http_server, pretty):
  function test_json_input_preserve_order (line 329) | def test_json_input_preserve_order(httpbin_both):
  function test_options_content_length_preservation (line 355) | def test_options_content_length_preservation(httpbin, extra_args, expect...
  function test_options_dropping_redundant_content_length (line 366) | def test_options_dropping_redundant_content_length(httpbin, method):

FILE: tests/test_httpie_cli.py
  function test_plugins_cli_error_message_without_args (line 15) | def test_plugins_cli_error_message_without_args():
  function test_plugins_cli_error_messages_with_example (line 33) | def test_plugins_cli_error_messages_with_example(example):
  function test_plugins_cli_error_messages_invalid_example (line 53) | def test_plugins_cli_error_messages_invalid_example(example):
  function test_httpie_sessions_upgrade (line 82) | def test_httpie_sessions_upgrade(tmp_path, old_session_file, new_session...
  function test_httpie_sessions_upgrade_on_non_existent_file (line 95) | def test_httpie_sessions_upgrade_on_non_existent_file(tmp_path):
  function test_httpie_sessions_upgrade_all (line 106) | def test_httpie_sessions_upgrade_all(tmp_path, mock_env, extra_args, ext...
  function test_cli_export (line 135) | def test_cli_export(load_func, extra_options):

FILE: tests/test_json.py
  function test_json_formatter_with_body_preceded_by_non_json_data (line 62) | def test_json_formatter_with_body_preceded_by_non_json_data(
  function test_duplicate_keys_support_from_response (line 95) | def test_duplicate_keys_support_from_response():
  function test_duplicate_keys_support_from_input_file (line 115) | def test_duplicate_keys_support_from_input_file():
  function test_simple_json_arguments_with_non_json (line 135) | def test_simple_json_arguments_with_non_json(httpbin, value):
  function test_complex_json_arguments_with_non_json (line 152) | def test_complex_json_arguments_with_non_json(httpbin, request_type, val...
  function test_nested_json_syntax (line 454) | def test_nested_json_syntax(input_json, expected_json, httpbin):
  function test_nested_json_errors (line 567) | def test_nested_json_errors(input_json, expected_error, httpbin):
  function test_nested_json_sparse_array (line 581) | def test_nested_json_sparse_array(httpbin_both):

FILE: tests/test_meta.py
  function test_meta_elapsed_time (line 8) | def test_meta_elapsed_time(httpbin):
  function test_meta_elapsed_time_colors (line 14) | def test_meta_elapsed_time_colors(httpbin, style):

FILE: tests/test_offline.py
  function test_offline (line 5) | def test_offline():
  function test_offline_raw (line 13) | def test_offline_raw():
  function test_offline_raw_empty_should_use_POST (line 24) | def test_offline_raw_empty_should_use_POST():
  function test_offline_form (line 34) | def test_offline_form():
  function test_offline_json (line 45) | def test_offline_json():
  function test_offline_multipart (line 55) | def test_offline_multipart():
  function test_offline_from_file (line 66) | def test_offline_from_file():
  function test_offline_chunked (line 76) | def test_offline_chunked():
  function test_offline_download (line 89) | def test_offline_download():

FILE: tests/test_output.py
  function test_output_option (line 33) | def test_output_option(tmp_path, httpbin, stdout_isatty):
  class TestQuietFlag (line 47) | class TestQuietFlag:
    method test_quiet (line 51) | def test_quiet(self, httpbin, quiet_flags):
    method test_quiet_with_check_status_non_zero (line 64) | def test_quiet_with_check_status_non_zero(self, httpbin):
    method test_quiet_with_check_status_non_zero_pipe (line 71) | def test_quiet_with_check_status_non_zero_pipe(self, httpbin):
    method test_quiet_quiet_with_check_status_non_zero (line 79) | def test_quiet_quiet_with_check_status_non_zero(self, httpbin):
    method test_quiet_quiet_with_check_status_non_zero_pipe (line 86) | def test_quiet_quiet_with_check_status_non_zero_pipe(self, httpbin):
    method test_quiet_on_python_warnings (line 102) | def test_quiet_on_python_warnings(self, test_patch, httpbin, flags, ex...
    method test_double_quiet_on_error (line 113) | def test_double_quiet_on_error(self, httpbin):
    method test_quiet_with_password_prompt (line 124) | def test_quiet_with_password_prompt(self, httpbin, quiet_flags):
    method test_quiet_with_explicit_output_options (line 148) | def test_quiet_with_explicit_output_options(self, httpbin, quiet_flags...
    method test_quiet_with_output_redirection (line 158) | def test_quiet_with_output_redirection(self, tmp_path, httpbin, quiet_...
  class TestVerboseFlag (line 188) | class TestVerboseFlag:
    method test_verbose (line 189) | def test_verbose(self, httpbin):
    method test_verbose_raw (line 195) | def test_verbose_raw(self, httpbin):
    method test_verbose_form (line 201) | def test_verbose_form(self, httpbin):
    method test_verbose_json (line 208) | def test_verbose_json(self, httpbin):
    method test_verbose_implies_all (line 214) | def test_verbose_implies_all(self, httpbin):
  class TestColors (line 222) | class TestColors:
    method test_get_lexer (line 242) | def test_get_lexer(self, mime, explicit_json, body, expected_lexer_name):
    method test_get_lexer_not_found (line 247) | def test_get_lexer_not_found(self):
  function test_ensure_contents_colored (line 257) | def test_ensure_contents_colored(httpbin, endpoint):
  function test_ensure_meta_is_colored (line 264) | def test_ensure_meta_is_colored(httpbin, style):
  function test_ensure_status_code_is_shown_on_all_themes (line 278) | def test_ensure_status_code_is_shown_on_all_themes(http_server, style, m...
  class TestPrettyOptions (line 288) | class TestPrettyOptions:
    method test_pretty_enabled_by_default (line 291) | def test_pretty_enabled_by_default(self, httpbin):
    method test_pretty_enabled_by_default_unless_stdout_redirected (line 296) | def test_pretty_enabled_by_default_unless_stdout_redirected(self, http...
    method test_force_pretty (line 300) | def test_force_pretty(self, httpbin):
    method test_force_ugly (line 305) | def test_force_ugly(self, httpbin):
    method test_subtype_based_pygments_lexer_match (line 309) | def test_subtype_based_pygments_lexer_match(self, httpbin):
    method test_colors_option (line 319) | def test_colors_option(self, httpbin):
    method test_format_option (line 328) | def test_format_option(self, httpbin):
  class TestLineEndings (line 338) | class TestLineEndings:
    method _validate_crlf (line 345) | def _validate_crlf(self, msg):
    method test_CRLF_headers_only (line 357) | def test_CRLF_headers_only(self, httpbin):
    method test_CRLF_ugly_response (line 362) | def test_CRLF_ugly_response(self, httpbin):
    method test_CRLF_formatted_response (line 366) | def test_CRLF_formatted_response(self, httpbin):
    method test_CRLF_ugly_request (line 371) | def test_CRLF_ugly_request(self, httpbin):
    method test_CRLF_formatted_request (line 375) | def test_CRLF_formatted_request(self, httpbin):
  class TestFormatOptions (line 380) | class TestFormatOptions:
    method test_header_formatting_options (line 381) | def test_header_formatting_options(self):
    method test_json_formatting_options (line 414) | def test_json_formatting_options(self, options: str, expected_json: str):
    method test_parse_format_options (line 432) | def test_parse_format_options(self, defaults, options_string, expected):
    method test_parse_format_options_errors (line 444) | def test_parse_format_options_errors(self, options_string, expected_er...
    method test_format_options_accumulation (line 594) | def test_format_options_accumulation(self, args, expected_format_optio...
  function test_response_mime_overwrite (line 603) | def test_response_mime_overwrite():
  function test_response_mime_overwrite_incorrect (line 622) | def test_response_mime_overwrite_incorrect():

FILE: tests/test_parser_schema.py
  function test_parser_serialization (line 4) | def test_parser_serialization():

FILE: tests/test_plugins_cli.py
  function test_plugins_installation (line 9) | def test_plugins_installation(httpie_plugins_success, interface, dummy_p...
  function test_plugin_installation_with_custom_config (line 19) | def test_plugin_installation_with_custom_config(httpie_plugins_success, ...
  function test_plugins_listing (line 33) | def test_plugins_listing(httpie_plugins_success, interface, dummy_plugin...
  function test_plugins_listing_multiple (line 43) | def test_plugins_listing_multiple(interface, httpie_plugins_success, dum...
  function test_plugins_uninstall (line 56) | def test_plugins_uninstall(interface, httpie_plugins_success, dummy_plug...
  function test_plugins_listing_after_uninstall (line 63) | def test_plugins_listing_after_uninstall(interface, httpie_plugins_succe...
  function test_plugins_uninstall_specific (line 72) | def test_plugins_uninstall_specific(interface, httpie_plugins_success):
  function test_plugins_installation_failed (line 86) | def test_plugins_installation_failed(httpie_plugins, interface):
  function test_plugins_uninstall_non_existent (line 95) | def test_plugins_uninstall_non_existent(httpie_plugins, interface):
  function test_plugins_double_uninstall (line 107) | def test_plugins_double_uninstall(httpie_plugins, httpie_plugins_success...
  function test_plugins_upgrade (line 123) | def test_plugins_upgrade(httpie_plugins, httpie_plugins_success, dummy_p...
  function test_broken_plugins (line 136) | def test_broken_plugins(httpie_plugins, httpie_plugins_success, dummy_pl...

FILE: tests/test_redirects.py
  function test_follow_all_redirects_shown (line 15) | def test_follow_all_redirects_shown(httpbin):
  function test_follow_without_all_redirects_hidden (line 23) | def test_follow_without_all_redirects_hidden(httpbin, follow_flag):
  function test_follow_output_options_used_for_redirects (line 30) | def test_follow_output_options_used_for_redirects(httpbin):
  function test_follow_all_output_options_used_for_redirects (line 36) | def test_follow_all_output_options_used_for_redirects(httpbin):
  function test_max_redirects (line 60) | def test_max_redirects(httpbin):
  function test_follow_redirect_with_repost (line 72) | def test_follow_redirect_with_repost(httpbin, status_code):
  function test_verbose_follow_redirect_with_repost (line 91) | def test_verbose_follow_redirect_with_repost(httpbin, status_code):

FILE: tests/test_regressions.py
  function test_Host_header_overwrite (line 9) | def test_Host_header_overwrite(httpbin):
  function test_output_devnull (line 23) | def test_output_devnull(httpbin):
  function test_verbose_redirected_stdout_separator (line 31) | def test_verbose_redirected_stdout_separator(httpbin):

FILE: tests/test_sessions.py
  class SessionTestBase (line 25) | class SessionTestBase:
    method start_session (line 27) | def start_session(self, httpbin):
    method teardown_method (line 31) | def teardown_method(self, method):
    method env (line 34) | def env(self):
  class CookieTestBase (line 46) | class CookieTestBase:
    method setup_method (line 47) | def setup_method(self, method):
    method teardown_method (line 63) | def teardown_method(self, method):
  class TestSessionFlow (line 67) | class TestSessionFlow(SessionTestBase):
    method start_session (line 73) | def start_session(self, httpbin):
    method test_session_created_and_reused (line 91) | def test_session_created_and_reused(self, httpbin):
    method test_session_update (line 101) | def test_session_update(self, httpbin):
    method test_session_read_only (line 124) | def test_session_read_only(self, httpbin):
    method test_session_overwrite_header (line 151) | def test_session_overwrite_header(self, httpbin):
  class TestSession (line 170) | class TestSession(SessionTestBase):
    method test_session_ignored_header_prefixes (line 173) | def test_session_ignored_header_prefixes(self, httpbin):
    method test_session_with_upload (line 186) | def test_session_with_upload(self, httpbin):
    method test_session_by_path (line 192) | def test_session_by_path(self, httpbin):
    method test_session_with_cookie_followed_by_another_header (line 204) | def test_session_with_cookie_followed_by_another_header(self, httpbin):
    method test_session_unicode (line 222) | def test_session_unicode(self, httpbin):
    method test_session_default_header_value_overwritten (line 240) | def test_session_default_header_value_overwritten(self, httpbin):
    method test_download_in_session (line 253) | def test_download_in_session(self, tmp_path, httpbin):
    method test_auth_type_reused_in_session (line 272) | def test_auth_type_reused_in_session(self, auth_require_param, auth_pa...
    method test_auth_plugin_prompt_password_in_session (line 306) | def test_auth_plugin_prompt_password_in_session(self, httpbin):
    method test_auth_type_stored_in_session_file (line 346) | def test_auth_type_stored_in_session_file(self, httpbin):
  class TestExpiredCookies (line 370) | class TestExpiredCookies(CookieTestBase):
    method test_removes_expired_cookies_from_session_obj (line 379) | def test_removes_expired_cookies_from_session_obj(self, initial_cookie...
    method test_expired_cookies (line 385) | def test_expired_cookies(self, httpbin):
    method test_get_expired_cookies_using_max_age (line 397) | def test_get_expired_cookies_using_max_age(self):
    method test_get_expired_cookies_manages_multiple_cookie_headers (line 442) | def test_get_expired_cookies_manages_multiple_cookie_headers(self, coo...
  class TestCookieStorage (line 446) | class TestCookieStorage(CookieTestBase):
    method test_existing_and_new_cookies_sent_in_request (line 477) | def test_existing_and_new_cookies_sent_in_request(
    method test_cookie_storage_priority (line 531) | def test_cookie_storage_priority(self, cli_cookie, set_cookie, expecte...
  function basic_session (line 549) | def basic_session(httpbin, tmp_path):
  function open_session (line 559) | def open_session(path: Path, env: Environment, read_only: bool = False) ...
  function open_raw_session (line 568) | def open_raw_session(path: Path, read_only: bool = False) -> None:
  function read_stderr (line 579) | def read_stderr(env: Environment) -> bytes:
  function test_old_session_version_saved_as_is (line 588) | def test_old_session_version_saved_as_is(basic_session, mock_env):
  function test_old_session_cookie_layout_warning (line 596) | def test_old_session_cookie_layout_warning(basic_session, mock_env):
  function test_cookie_security_warnings_on_raw_cookies (line 652) | def test_cookie_security_warnings_on_raw_cookies(basic_session, mock_env...
  function test_old_session_cookie_layout_loading (line 666) | def test_old_session_cookie_layout_loading(basic_session, httpbin, mock_...
  function test_session_cookie_layout_preservation (line 682) | def test_session_cookie_layout_preservation(basic_session, mock_env, lay...
  function test_session_cookie_layout_preservation_on_new_cookies (line 695) | def test_session_cookie_layout_preservation_on_new_cookies(basic_session...
  function test_headers_old_layout_warning (line 730) | def test_headers_old_layout_warning(basic_session, mock_env, headers, ex...
  function test_outdated_layout_mixed (line 744) | def test_outdated_layout_mixed(basic_session, mock_env):
  function test_old_session_header_layout_loading (line 759) | def test_old_session_header_layout_loading(basic_session, httpbin, mock_...
  function test_session_header_layout_preservation (line 775) | def test_session_header_layout_preservation(basic_session, mock_env, lay...
  function test_session_header_layout_preservation_on_new_headers (line 787) | def test_session_header_layout_preservation_on_new_headers(basic_session...
  function test_session_multiple_headers_with_same_name (line 802) | def test_session_multiple_headers_with_same_name(basic_session, httpbin):
  function test_secure_cookies_on_localhost (line 833) | def test_secure_cookies_on_localhost(mock_env, tmp_path, server, expecte...

FILE: tests/test_ssl.py
  function test_ssl_version (line 54) | def test_ssl_version(httpbin_secure, ssl_version):
  class TestClientCert (line 77) | class TestClientCert:
    method test_cert_and_key (line 79) | def test_cert_and_key(self, httpbin_secure):
    method test_cert_pem (line 85) | def test_cert_pem(self, httpbin_secure):
    method test_cert_file_not_found (line 90) | def test_cert_file_not_found(self, httpbin_secure):
    method test_cert_file_invalid (line 97) | def test_cert_file_invalid(self, httpbin_secure):
    method test_cert_ok_but_missing_key (line 102) | def test_cert_ok_but_missing_key(self, httpbin_secure):
  class TestServerCert (line 108) | class TestServerCert:
    method test_verify_no_OK (line 110) | def test_verify_no_OK(self, httpbin_secure):
    method test_verify_false_OK (line 117) | def test_verify_false_OK(self, httpbin_secure, verify_value):
    method test_verify_custom_ca_bundle_path (line 122) | def test_verify_custom_ca_bundle_path(
    method test_self_signed_server_cert_by_default_raises_ssl_error (line 128) | def test_self_signed_server_cert_by_default_raises_ssl_error(
    method test_verify_custom_ca_bundle_invalid_path (line 135) | def test_verify_custom_ca_bundle_invalid_path(self, httpbin_secure):
    method test_verify_custom_ca_bundle_invalid_bundle (line 140) | def test_verify_custom_ca_bundle_invalid_bundle(self, httpbin_secure):
  function test_ciphers (line 145) | def test_ciphers(httpbin_secure):
  function test_ciphers_none_can_be_selected (line 155) | def test_ciphers_none_can_be_selected(httpbin_secure):
  function test_pyopenssl_presence (line 171) | def test_pyopenssl_presence():
  function test_password_protected_cert_prompt (line 182) | def test_password_protected_cert_prompt(httpbin_secure):
  function test_password_protected_cert_prompt_invalid (line 191) | def test_password_protected_cert_prompt_invalid(httpbin_secure):
  function test_password_protected_cert_cli_arg (line 198) | def test_password_protected_cert_cli_arg(httpbin_secure):
  function test_password_protected_cert_cli_arg_invalid (line 206) | def test_password_protected_cert_cli_arg_invalid(httpbin_secure):

FILE: tests/test_stream.py
  class SortJSONConverterPlugin (line 24) | class SortJSONConverterPlugin(ConverterPlugin):
    method supports (line 26) | def supports(cls, mime):
    method convert (line 29) | def convert(self, body):
  function test_pretty_redirected_stream (line 40) | def test_pretty_redirected_stream(httpbin):
  function test_pretty_stream_ensure_full_stream_is_retrieved (line 53) | def test_pretty_stream_ensure_full_stream_is_retrieved(httpbin):
  function test_pretty_options_with_and_without_stream_with_converter (line 67) | def test_pretty_options_with_and_without_stream_with_converter(pretty, s...
  function test_encoded_stream (line 93) | def test_encoded_stream(httpbin):
  function test_redirected_stream (line 105) | def test_redirected_stream(httpbin):
  function test_auto_streaming (line 136) | def test_auto_streaming(http_server, extras, expected):
  function test_streaming_encoding_detection (line 147) | def test_streaming_encoding_detection(http_server):

FILE: tests/test_tokens.py
  function test_headers (line 16) | def test_headers():
  function test_redirected_headers (line 21) | def test_redirected_headers():
  function test_terminal_headers_and_body (line 26) | def test_terminal_headers_and_body():
  function test_terminal_request_headers_response_body (line 31) | def test_terminal_request_headers_response_body(httpbin):
  function test_raw_request_headers_response_body (line 36) | def test_raw_request_headers_response_body(httpbin):
  function test_terminal_request_headers_response_headers (line 41) | def test_terminal_request_headers_response_headers(httpbin):
  function test_raw_request_headers_response_headers (line 46) | def test_raw_request_headers_response_headers(httpbin):
  function test_terminal_request_body_response_body (line 51) | def test_terminal_request_body_response_body(httpbin):
  function test_raw_headers_and_body (line 56) | def test_raw_headers_and_body():
  function test_raw_body (line 64) | def test_raw_body():
  function test_raw_exchange (line 69) | def test_raw_exchange(httpbin):
  function test_terminal_exchange (line 75) | def test_terminal_exchange(httpbin):
  function test_headers_multipart_body_separator (line 81) | def test_headers_multipart_body_separator():
  function test_redirected_headers_multipart_no_separator (line 86) | def test_redirected_headers_multipart_no_separator():
  function test_verbose_chunked (line 94) | def test_verbose_chunked(httpbin_with_chunked_support):
  function test_request_headers_response_body (line 101) | def test_request_headers_response_body(httpbin):
  function test_request_single_verbose (line 106) | def test_request_single_verbose(httpbin):
  function test_request_double_verbose (line 111) | def test_request_double_verbose(httpbin):
  function test_request_meta (line 116) | def test_request_meta(httpbin):

FILE: tests/test_transport_plugin.py
  class FakeAdapter (line 15) | class FakeAdapter(BaseAdapter):
    method send (line 16) | def send(self, request, **kwargs):
  class FakeTransportPlugin (line 28) | class FakeTransportPlugin(TransportPlugin):
    method get_adapter (line 33) | def get_adapter(self):
  function test_transport_from_requests_response (line 37) | def test_transport_from_requests_response(httpbin):

FILE: tests/test_update_warnings.py
  function check_update_warnings (line 29) | def check_update_warnings(text):
  function test_daemon_runner (line 34) | def test_daemon_runner():
  function test_fetch (line 59) | def test_fetch(static_fetch_data, without_warnings):
  function test_fetch_dont_override_existing_layout (line 77) | def test_fetch_dont_override_existing_layout(
  function test_fetch_broken_json (line 103) | def test_fetch_broken_json(static_fetch_data, without_warnings):
  function test_check_updates_disable_warnings (line 118) | def test_check_updates_disable_warnings(
  function test_check_updates_first_invocation (line 126) | def test_check_updates_first_invocation(
  function test_check_updates_first_time_after_data_fetch (line 141) | def test_check_updates_first_time_after_data_fetch(
  function test_check_updates_first_time_after_data_fetch_unknown_build_channel (line 158) | def test_check_updates_first_time_after_data_fetch_unknown_build_channel(
  function test_cli_check_updates (line 172) | def test_cli_check_updates(
  function test_cli_check_updates_not_shown (line 186) | def test_cli_check_updates_not_shown(
  function with_warnings (line 196) | def with_warnings(tmp_path):
  function without_warnings (line 204) | def without_warnings(tmp_path):
  function fetch_update_mock (line 212) | def fetch_update_mock(mocker):
  function static_fetch_data (line 218) | def static_fetch_data(mocker):
  function unknown_build_channel (line 229) | def unknown_build_channel(mocker):
  function higher_build_channel (line 234) | def higher_build_channel(mocker):
  function lower_build_channel (line 239) | def lower_build_channel(mocker):

FILE: tests/test_uploads.py
  function test_chunked_json (line 24) | def test_chunked_json(httpbin_with_chunked_support):
  function test_chunked_form (line 36) | def test_chunked_form(httpbin_with_chunked_support):
  function test_chunked_stdin (line 49) | def test_chunked_stdin(httpbin_with_chunked_support):
  function test_chunked_stdin_multiple_chunks (line 64) | def test_chunked_stdin_multiple_chunks(httpbin_with_chunked_support):
  function test_chunked_raw (line 82) | def test_chunked_raw(httpbin_with_chunked_support):
  function stdin_processes (line 95) | def stdin_processes(httpbin, *args, warn_threshold=0.1):
  function test_reading_from_stdin (line 128) | def test_reading_from_stdin(httpbin, wait):
  function test_stdin_read_warning (line 146) | def test_stdin_read_warning(httpbin):
  function test_stdin_read_warning_with_quiet (line 162) | def test_stdin_read_warning_with_quiet(httpbin):
  function test_stdin_read_warning_blocking_exit (line 178) | def test_stdin_read_warning_blocking_exit(httpbin):
  class TestMultipartFormDataFileUpload (line 190) | class TestMultipartFormDataFileUpload:
    method test_non_existent_file_raises_parse_error (line 192) | def test_non_existent_file_raises_parse_error(self, httpbin):
    method test_upload_ok (line 197) | def test_upload_ok(self, httpbin):
    method test_upload_multiple_fields_with_the_same_name (line 208) | def test_upload_multiple_fields_with_the_same_name(self, httpbin):
    method test_upload_custom_content_type (line 220) | def test_upload_custom_content_type(self, httpbin):
    method test_form_no_files_urlencoded (line 234) | def test_form_no_files_urlencoded(self, httpbin):
    method test_multipart (line 245) | def test_multipart(self, httpbin):
    method test_form_multipart_custom_boundary (line 257) | def test_form_multipart_custom_boundary(self, httpbin):
    method test_multipart_custom_content_type_boundary_added (line 271) | def test_multipart_custom_content_type_boundary_added(self, httpbin):
    method test_multipart_custom_content_type_boundary_preserved (line 286) | def test_multipart_custom_content_type_boundary_preserved(self, httpbin):
    method test_multipart_chunked (line 303) | def test_multipart_chunked(self, httpbin_with_chunked_support):
    method test_multipart_preserve_order (line 316) | def test_multipart_preserve_order(self, httpbin):
  class TestRequestBodyFromFilePath (line 336) | class TestRequestBodyFromFilePath:
    method test_request_body_from_file_by_path (line 342) | def test_request_body_from_file_by_path(self, httpbin):
    method test_request_body_from_file_by_path_chunked (line 352) | def test_request_body_from_file_by_path_chunked(self, httpbin_with_chu...
    method test_request_body_from_file_by_path_with_explicit_content_type (line 363) | def test_request_body_from_file_by_path_with_explicit_content_type(
    method test_request_body_from_file_by_path_no_field_name_allowed (line 372) | def test_request_body_from_file_by_path_no_field_name_allowed(
    method test_request_body_from_file_by_path_no_data_items_allowed (line 379) | def test_request_body_from_file_by_path_no_data_items_allowed(
    method test_multiple_request_bodies_from_file_by_path (line 392) | def test_multiple_request_bodies_from_file_by_path(self, httpbin):

FILE: tests/test_windows.py
  class TestWindowsOnly (line 9) | class TestWindowsOnly:
    method test_windows_colorized_output (line 13) | def test_windows_colorized_output(self, httpbin):
  class TestFakeWindows (line 18) | class TestFakeWindows:
    method test_output_file_pretty_not_allowed_on_windows (line 19) | def test_output_file_pretty_not_allowed_on_windows(self, tmp_path, htt...

FILE: tests/test_xml.py
  function test_xml_format_options (line 22) | def test_xml_format_options(options, expected_xml):
  function test_valid_xml (line 36) | def test_valid_xml(file):
  function test_xml_xhtml (line 58) | def test_xml_xhtml():
  function test_invalid_xml (line 85) | def test_invalid_xml(file):

FILE: tests/utils/__init__.py
  function strip_colors (line 57) | def strip_colors(colorized_msg: str) -> str:
  function mk_config_dir (line 61) | def mk_config_dir() -> Path:
  function add_auth (line 66) | def add_auth(url, auth):
  class Encoder (line 71) | class Encoder:
    method __init__ (line 89) | def __init__(self):
    method substitute (line 92) | def substitute(self, data: bytes) -> str:
    method decode (line 97) | def decode(self, data: str) -> Union[str, bytes]:
  class FakeBytesIOBuffer (line 108) | class FakeBytesIOBuffer(BytesIO):
    method __init__ (line 110) | def __init__(self, original, encoder, *args, **kwargs):
    method write (line 115) | def write(self, data):
  class StdinBytesIO (line 124) | class StdinBytesIO(BytesIO):
  class MockEnvironment (line 129) | class MockEnvironment(Environment):
    method __init__ (line 137) | def __init__(self, create_temp_config_dir=True, **kwargs):
    method config (line 159) | def config(self) -> Config:
    method create_temp_config_dir (line 165) | def create_temp_config_dir(self):
    method cleanup (line 169) | def cleanup(self):
    method __del__ (line 179) | def __del__(self):
  class PersistentMockEnvironment (line 187) | class PersistentMockEnvironment(MockEnvironment):
    method cleanup (line 188) | def cleanup(self):
  class BaseCLIResponse (line 192) | class BaseCLIResponse:
    method command (line 213) | def command(self):  # noqa: F811
    method from_raw_data (line 219) | def from_raw_data(self, data: Union[str, bytes]) -> 'BaseCLIResponse':
  class BytesCLIResponse (line 230) | class BytesCLIResponse(bytes, BaseCLIResponse):
  class StrCLIResponse (line 241) | class StrCLIResponse(str, BaseCLIResponse):
    method json (line 244) | def json(self) -> Optional[dict]:
  class ExitStatusError (line 275) | class ExitStatusError(Exception):
  function mock_env (line 280) | def mock_env() -> MockEnvironment:
  function normalize_args (line 286) | def normalize_args(args: Iterable[Any]) -> List[str]:
  function httpie (line 290) | def httpie(
  function http (line 326) | def http(

FILE: tests/utils/http_server.py
  class TestHandler (line 14) | class TestHandler(BaseHTTPRequestHandler):
    method handler (line 18) | def handler(cls, method, path):
    method do_generic (line 24) | def do_generic(self):
  function get_headers (line 37) | def get_headers(handler):
  function chunked_drip (line 46) | def chunked_drip(handler):
  function random_encoding (line 62) | def random_encoding(handler):
  function status_custom_msg (line 83) | def status_custom_msg(handler):
  function get_cookies (line 92) | def get_cookies(handler):
  function set_cookies (line 109) | def set_cookies(handler):
  function set_cookie_and_redirect (line 120) | def set_cookie_and_redirect(handler):
  function _http_server (line 133) | def _http_server():
  function http_server (line 143) | def http_server():
  function localhost_http_server (line 153) | def localhost_http_server():

FILE: tests/utils/matching/__init__.py
  function assert_output_matches (line 21) | def assert_output_matches(output: str, tokens: Iterable[Expect]):
  function assert_output_does_not_match (line 33) | def assert_output_does_not_match(output: str, tokens: Iterable[Expect]):

FILE: tests/utils/matching/parsing.py
  function make_headers_re (line 13) | def make_headers_re(message_type: Expect):
  class OutputMatchingError (line 52) | class OutputMatchingError(ValueError):
  function expect_tokens (line 56) | def expect_tokens(tokens: Iterable[Expect], s: str):
  function expect_token (line 63) | def expect_token(token: Expect, s: str) -> str:
  function expect_regex (line 71) | def expect_regex(token: Expect, s: str) -> str:
  function expect_body (line 78) | def expect_body(s: str) -> str:

FILE: tests/utils/matching/test_matching.py
  function test_assert_output_matches_headers_incomplete (line 11) | def test_assert_output_matches_headers_incomplete():
  function test_assert_output_matches_headers_unterminated (line 15) | def test_assert_output_matches_headers_unterminated():
  function test_assert_output_matches_response_headers (line 26) | def test_assert_output_matches_response_headers():
  function test_assert_output_matches_request_headers (line 37) | def test_assert_output_matches_request_headers():
  function test_assert_output_matches_headers_and_separator (line 48) | def test_assert_output_matches_headers_and_separator():
  function test_assert_output_matches_body_unmatched_crlf (line 60) | def test_assert_output_matches_body_unmatched_crlf():
  function test_assert_output_matches_body_unmatched_separator (line 64) | def test_assert_output_matches_body_unmatched_separator():
  function test_assert_output_matches_body_and_separator (line 68) | def test_assert_output_matches_body_and_separator():
  function test_assert_output_matches_body_r (line 72) | def test_assert_output_matches_body_r():
  function test_assert_output_matches_body_n (line 76) | def test_assert_output_matches_body_n():
  function test_assert_output_matches_body_r_body (line 80) | def test_assert_output_matches_body_r_body():
  function test_assert_output_matches_body_n_body (line 84) | def test_assert_output_matches_body_n_body():
  function test_assert_output_matches_headers_and_body (line 88) | def test_assert_output_matches_headers_and_body():
  function test_assert_output_matches_headers_with_body_and_separator (line 100) | def test_assert_output_matches_headers_with_body_and_separator():
  function test_assert_output_matches_response_meta (line 111) | def test_assert_output_matches_response_meta():
  function test_assert_output_matches_whole_response (line 121) | def test_assert_output_matches_whole_response():
  function test_assert_output_matches_multiple_messages (line 134) | def test_assert_output_matches_multiple_messages():
  function test_assert_output_matches_multipart_body (line 161) | def test_assert_output_matches_multipart_body():
  function test_assert_output_matches_multipart_body_with_separator (line 185) | def test_assert_output_matches_multipart_body_with_separator():
  function test_assert_output_matches_multiple_separators (line 210) | def test_assert_output_matches_multiple_separators():

FILE: tests/utils/matching/tokens.py
  class Expect (line 4) | class Expect(Enum):
  class ExpectSequence (line 16) | class ExpectSequence:

FILE: tests/utils/plugins_cli.py
  function make_name (line 23) | def make_name() -> str:
  class EntryPoint (line 28) | class EntryPoint:
    method dump (line 32) | def dump(self) -> Dict[str, str]:
  class Plugin (line 37) | class Plugin:
    method build (line 44) | def build(self) -> None:
    method dump (line 87) | def dump(self) -> Dict[str, Any]:
    method path (line 97) | def path(self) -> Path:
    method import_name (line 101) | def import_name(self) -> str:
  class Interface (line 106) | class Interface:
    method get_plugin (line 110) | def get_plugin(self, target: str) -> importlib_metadata.Distribution:
    method is_installed (line 114) | def is_installed(self, target: str) -> bool:
    method make_dummy_plugin (line 122) | def make_dummy_plugin(self, build=True, **kwargs) -> Plugin:
  function parse_listing (line 131) | def parse_listing(lines: List[str]) -> Dict[str, Any]:
  function interface (line 167) | def interface(tmp_path):
  function dummy_plugin (line 177) | def dummy_plugin(interface):
  function broken_plugin (line 182) | def broken_plugin(interface):
  function dummy_plugins (line 190) | def dummy_plugins(interface):
  function httpie_plugins (line 207) | def httpie_plugins(interface):
  function httpie_plugins_success (line 230) | def httpie_plugins_success(httpie_plugins):
Condensed preview — 261 files, each showing path, character count, and a content snippet. Download the .json file or copy for the full structured content (1,041K chars).
[
  {
    "path": ".editorconfig",
    "chars": 246,
    "preview": "# https://editorconfig.org\nroot = true\n\n[*]\nindent_style = space\nindent_size = 4\nend_of_line = lf\ncharset = utf-8\ntrim_t"
  },
  {
    "path": ".github/ISSUE_TEMPLATE/bug_report.md",
    "chars": 590,
    "preview": "---\nname: Bug report\nabout: Report a possible bug in HTTPie\ntitle: ''\nlabels: \"new, bug\"\nassignees: ''\n\n---\n\n## Checklis"
  },
  {
    "path": ".github/ISSUE_TEMPLATE/feature_request.md",
    "chars": 389,
    "preview": "---\nname: Feature request\nabout: Suggest an enhancement for HTTPie\ntitle: ''\nlabels: \"new, enhancement\"\nassignees: ''\n\n-"
  },
  {
    "path": ".github/ISSUE_TEMPLATE/other.md",
    "chars": 201,
    "preview": "---\nname: Other\nabout: Anything else that isn't a feature or a bug\ntitle: ''\nlabels: \"new\"\nassignees: ''\n\n---\n\nIf you ha"
  },
  {
    "path": ".github/dependabot.yml",
    "chars": 161,
    "preview": "version: 2\nupdates:\n  # GitHub Actions\n  - package-ecosystem: github-actions\n    directory: /\n    schedule:\n      interv"
  },
  {
    "path": ".github/workflows/benchmark.yml",
    "chars": 1429,
    "preview": "name: Benchmark\n\non:\n  pull_request:\n    types: [ labeled ]\n\npermissions:\n  issues: write\n  pull-requests: write\n\njobs:\n"
  },
  {
    "path": ".github/workflows/code-style.yml",
    "chars": 404,
    "preview": "name: Code Style Check\n\non:\n  pull_request:\n    paths:\n      - .github/workflows/code-style.yml\n      - extras/*.py\n    "
  },
  {
    "path": ".github/workflows/content.yml",
    "chars": 585,
    "preview": "name: Update Generated Content\non:\n  push:\n    branches:\n      - master\njobs:\n  update-content:\n    runs-on: ubuntu-late"
  },
  {
    "path": ".github/workflows/coverage.yml",
    "chars": 511,
    "preview": "name: Coverage\n\non:\n  pull_request:\n    paths:\n      - .github/workflows/coverage.yml\n      - httpie/**/*.py\n      - set"
  },
  {
    "path": ".github/workflows/docs-check-markdown.yml",
    "chars": 399,
    "preview": "name: Check Markdown Style\n\non:\n  pull_request:\n    paths:\n      - \"*.md\"\n      - \"**/*.md\"\n\njobs:\n  doc:\n    runs-on: u"
  },
  {
    "path": ".github/workflows/docs-deploy.yml",
    "chars": 458,
    "preview": "name: Deploy Documentation\n\non:\n  push:\n    branches:\n      - master\n    paths:\n      - docs/README.md\n      - docs/conf"
  },
  {
    "path": ".github/workflows/release-brew.yml",
    "chars": 613,
    "preview": "name: Release on Homebrew\n\non:\n  workflow_dispatch:\n    inputs:\n      branch:\n        description: \"The branch, tag or S"
  },
  {
    "path": ".github/workflows/release-choco.yml",
    "chars": 1945,
    "preview": "name: Release on Chocolatey\n\non:\n  workflow_dispatch:\n    inputs:\n      branch:\n        description: \"The branch, tag or"
  },
  {
    "path": ".github/workflows/release-linux-standalone.yml",
    "chars": 2407,
    "preview": "name: Release as Standalone Linux Package\n\non:\n  workflow_dispatch:\n    inputs:\n      branch:\n        description: \"The "
  },
  {
    "path": ".github/workflows/release-pypi.yml",
    "chars": 701,
    "preview": "name: Release on PyPI\n\non:\n  workflow_dispatch:\n    inputs:\n      branch:\n        description: \"The branch, tag or SHA t"
  },
  {
    "path": ".github/workflows/release-snap.yml",
    "chars": 1066,
    "preview": "name: Release on Snap\n\non:\n  workflow_dispatch:\n    inputs:\n      branch:\n        description: \"The branch, tag or SHA t"
  },
  {
    "path": ".github/workflows/stale.yml",
    "chars": 659,
    "preview": "name: Mark stale pull requests\n\non: workflow_dispatch\n\npermissions:\n  pull-requests: write\n\njobs:\n  stale:\n    runs-on: "
  },
  {
    "path": ".github/workflows/test-package-linux-snap.yml",
    "chars": 697,
    "preview": "name: Test Snap Package (Linux)\n\n\non:\n  pull_request:\n    paths:\n      - .github/workflows/test-package-linux-snap.yml\n "
  },
  {
    "path": ".github/workflows/test-package-mac-brew.yml",
    "chars": 420,
    "preview": "name: Test Brew Package (MacOS)\n\non:\n  pull_request:\n    paths:\n      - .github/workflows/test-package-mac-brew.yml\n    "
  },
  {
    "path": ".github/workflows/tests.yml",
    "chars": 1362,
    "preview": "name: Tests\nconcurrency:\n  group: ${{ github.head_ref || github.run_id }}\n  cancel-in-progress: true\n\non:\n  push:\n    br"
  },
  {
    "path": ".gitignore",
    "chars": 2258,
    "preview": ".DS_Store\n.idea/\n*.egg-info\n.cache/\n*.pyc\nhtmlcov\n\n\n####################################################################"
  },
  {
    "path": ".packit.yaml",
    "chars": 520,
    "preview": "# See the documentation for more information:\n# https://packit.dev/docs/configuration/\nspecfile_path: httpie.spec\naction"
  },
  {
    "path": "AUTHORS.md",
    "chars": 1778,
    "preview": "# HTTPie authors\n\n- [Jakub Roztocil](https://github.com/jakubroztocil)\n\n## Patches, features, ideas\n\n[Complete list of c"
  },
  {
    "path": "CHANGELOG.md",
    "chars": 26504,
    "preview": "# Change Log\n\nThis document records all notable changes to [HTTPie](https://httpie.io).\nThis project adheres to [Semanti"
  },
  {
    "path": "CODE_OF_CONDUCT.md",
    "chars": 3334,
    "preview": "# Contributor Covenant Code of Conduct\n\n## Our Pledge\n\nIn the interest of fostering an open and welcoming environment, w"
  },
  {
    "path": "CONTRIBUTING.md",
    "chars": 6791,
    "preview": "# Contributing to HTTPie\n\nBug reports and code and documentation patches are welcome. You can\nhelp this project also by "
  },
  {
    "path": "LICENSE",
    "chars": 1533,
    "preview": "Copyright © 2012-2022 Jakub Roztocil <jakub@roztocil.co>\n\nRedistribution and use in source and binary forms, with or wit"
  },
  {
    "path": "MANIFEST.in",
    "chars": 170,
    "preview": "include LICENSE\ninclude README.md\ninclude CHANGELOG.md\ninclude AUTHORS.md\ninclude docs/README.md\n\n# <https://github.com/"
  },
  {
    "path": "Makefile",
    "chars": 6644,
    "preview": "###############################################################################\n# See ./CONTRIBUTING.md\n################"
  },
  {
    "path": "README.md",
    "chars": 4883,
    "preview": "<h2 align=\"center\">\n    <a href=\"https://httpie.io\" target=\"blank_\">\n        <img height=\"100\" alt=\"HTTPie\" src=\"https:/"
  },
  {
    "path": "SECURITY.md",
    "chars": 589,
    "preview": "# Security policy\n\n## Reporting a vulnerability\n\nWhen you identify a vulnerability in HTTPie, please report it privately"
  },
  {
    "path": "docs/README.md",
    "chars": 84352,
    "preview": "<div class='hidden-website'>\n\n# HTTPie documentation\n\n</div>\n\nHTTPie (pronounced _aitch-tee-tee-pie_) is a command-line "
  },
  {
    "path": "docs/config.json",
    "chars": 73,
    "preview": "{\n  \"website\": {\n    \"master_and_released_docs_differ_after\": null\n  }\n}\n"
  },
  {
    "path": "docs/contributors/README.md",
    "chars": 168,
    "preview": "Here we maintain a database of contributors, from which we generate credits on release blog posts and social media.\n\nFor"
  },
  {
    "path": "docs/contributors/fetch.py",
    "chars": 8916,
    "preview": "\"\"\"\nGenerate the contributors database.\n\nFIXME: replace `requests` calls with the HTTPie API, when available.\n\"\"\"\nimport"
  },
  {
    "path": "docs/contributors/generate.py",
    "chars": 1110,
    "preview": "\"\"\"\nGenerate snippets to copy-paste.\n\"\"\"\nimport sys\n\nfrom jinja2 import Template\n\nfrom fetch import HERE, load_awesome_p"
  },
  {
    "path": "docs/contributors/people.json",
    "chars": 14081,
    "preview": "{\n    \"Aaron Miller\": {\n        \"committed\": [],\n        \"github\": \"aaronhmiller\",\n        \"reported\": [\n            \"3."
  },
  {
    "path": "docs/contributors/snippet.jinja2",
    "chars": 529,
    "preview": "<!-- Blog post -->\n\n## Community contributions\n\nWe’d like to thank these amazing people for their contributions to this "
  },
  {
    "path": "docs/installation/README.md",
    "chars": 315,
    "preview": "Here we maintain a database of installation methods, from which we generate\nthe installation section in docs. If you’d l"
  },
  {
    "path": "docs/installation/generate.py",
    "chars": 2390,
    "preview": "import re\nimport sys\nfrom pathlib import Path\nfrom typing import Dict\n\nimport yaml\nfrom jinja2 import Template\n\nDatabase"
  },
  {
    "path": "docs/installation/installation.jinja2",
    "chars": 886,
    "preview": "<!--\nTHE INSTALLATION SECTION IS GENERATED\n\nDo not edit here, but in docs/installation/.\n\n-->\n{% for platform, tools in "
  },
  {
    "path": "docs/installation/methods.yml",
    "chars": 5670,
    "preview": "# Database of HTTPie installation methods. Used to build the docs.\n#\n# We currently only include here methods for popula"
  },
  {
    "path": "docs/markdownlint.rb",
    "chars": 1108,
    "preview": "# Rules for <https://github.com/markdownlint/markdownlint>\n\n# Load all rules by default\nall\n\n#\n# Tweak rules\n#\n\n# MD002 "
  },
  {
    "path": "docs/packaging/README.md",
    "chars": 2850,
    "preview": "# HTTPie release process\n\nWelcome on the documentation part of the **HTTPie release process**.\n\n- If you do not know HTT"
  },
  {
    "path": "docs/packaging/brew/README.md",
    "chars": 1530,
    "preview": "# HTTPie on Homebrew, and Linuxbrew\n\nWelcome to the documentation about **packaging HTTPie for Homebrew**.\n\n- If you do "
  },
  {
    "path": "docs/packaging/brew/httpie.rb",
    "chars": 4248,
    "preview": "class Httpie < Formula\n  include Language::Python::Virtualenv\n\n  desc \"User-friendly cURL replacement (command-line HTTP"
  },
  {
    "path": "docs/packaging/brew/update.sh",
    "chars": 136,
    "preview": "#!/bin/bash\n\nset -xe\n\nrm -f httpie.rb\nhttp --download https://raw.githubusercontent.com/Homebrew/homebrew-core/master/Fo"
  },
  {
    "path": "docs/packaging/linux-arch/PKGBUILD",
    "chars": 1574,
    "preview": "# Maintainer: Jelle van der Waa <jelle@archlinux.org>\n# Maintainer: daurnimator <daurnimator@archlinux.org>\n# Contributo"
  },
  {
    "path": "docs/packaging/linux-arch/README.md",
    "chars": 1377,
    "preview": "# HTTPie on Arch Linux, and derived\n\nWelcome to the documentation about **packaging HTTPie for Arch Linux**.\n\n- If you d"
  },
  {
    "path": "docs/packaging/linux-centos/README.md",
    "chars": 1672,
    "preview": "# HTTPie on CentOS, RHEL, and derived\n\nWelcome to the documentation about **packaging HTTPie for CentOS and RHEL**.\n\n- I"
  },
  {
    "path": "docs/packaging/linux-debian/README.md",
    "chars": 2180,
    "preview": "# HTTPie on Debian, Ubuntu, and derived\n\nWelcome to the documentation about **packaging HTTPie for Debian GNU/Linux**.\n\n"
  },
  {
    "path": "docs/packaging/linux-fedora/README.md",
    "chars": 2324,
    "preview": "# HTTPie on Fedora\n\nWelcome to the documentation about **packaging HTTPie for Fedora**.\n\n- If you do not know HTTPie, ha"
  },
  {
    "path": "docs/packaging/linux-fedora/httpie.spec.txt",
    "chars": 9342,
    "preview": "Name:           httpie\nVersion:        3.1.0\nRelease:        1%{?dist}\nSummary:        A Curl-like tool for humans\n\nLice"
  },
  {
    "path": "docs/packaging/linux-fedora/update.sh",
    "chars": 140,
    "preview": "#!/bin/bash\n\nset -xe\n\nrm -f httpie.spec.txt\nhttps --download src.fedoraproject.org/rpms/httpie/raw/rawhide/f/httpie.spec"
  },
  {
    "path": "docs/packaging/mac-ports/Portfile",
    "chars": 2288,
    "preview": "# -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8::et:sw=4:ts=4:"
  },
  {
    "path": "docs/packaging/mac-ports/README.md",
    "chars": 1556,
    "preview": "# HTTPie on MacPorts\n\nWelcome to the documentation about **packaging HTTPie for MacPorts**.\n\n- If you do not know HTTPie"
  },
  {
    "path": "docs/packaging/snapcraft/README.md",
    "chars": 1870,
    "preview": "# HTTPie on Snapcraft\n\nWelcome to the documentation about **packaging HTTPie for Snapcraft**.\n\n- If you do not know HTTP"
  },
  {
    "path": "docs/packaging/windows-chocolatey/README.md",
    "chars": 1633,
    "preview": "# HTTPie on Chocolatey\n\nWelcome to the documentation about **packaging HTTPie for Chocolatey**.\n\n- If you do not know HT"
  },
  {
    "path": "docs/packaging/windows-chocolatey/httpie.nuspec",
    "chars": 2346,
    "preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<package xmlns=\"http://schemas.microsoft.com/packaging/2015/06/nuspec.xsd\">\n\t<me"
  },
  {
    "path": "docs/packaging/windows-chocolatey/tools/chocolateyinstall.ps1",
    "chars": 138,
    "preview": "$ErrorActionPreference = 'Stop';\npy -m pip install $env:ChocolateyPackageName==$env:ChocolateyPackageVersion --disable-"
  },
  {
    "path": "docs/packaging/windows-chocolatey/tools/chocolateyuninstall.ps1",
    "chars": 112,
    "preview": "$ErrorActionPreference = 'Stop';\npy -m pip uninstall -y $env:ChocolateyPackageName --disable-pip-version-check\n"
  },
  {
    "path": "extras/httpie-completion.bash",
    "chars": 745,
    "preview": "_http_complete() {\n    local cur_word=${COMP_WORDS[COMP_CWORD]}\n    local prev_word=${COMP_WORDS[COMP_CWORD - 1]}\n\n    i"
  },
  {
    "path": "extras/httpie-completion.fish",
    "chars": 6468,
    "preview": "function __fish_httpie_styles\n    printf '%s\\n' abap algol algol_nu arduino auto autumn borland bw colorful default emac"
  },
  {
    "path": "extras/man/http.1",
    "chars": 14651,
    "preview": ".\\\" This file is auto-generated from the parser declaration in httpie/cli/definition.py by extras/scripts/generate_man_p"
  },
  {
    "path": "extras/man/httpie.1",
    "chars": 2352,
    "preview": ".\\\" This file is auto-generated from the parser declaration in httpie/manager/cli.py by extras/scripts/generate_man_page"
  },
  {
    "path": "extras/man/https.1",
    "chars": 14654,
    "preview": ".\\\" This file is auto-generated from the parser declaration in httpie/cli/definition.py by extras/scripts/generate_man_p"
  },
  {
    "path": "extras/packaging/linux/Dockerfile",
    "chars": 1148,
    "preview": "# Use the oldest (but still supported) Ubuntu as the base for PyInstaller\n# packages. This will prevent stuff like glibc"
  },
  {
    "path": "extras/packaging/linux/README.md",
    "chars": 2963,
    "preview": "# Standalone Linux Packages\n\n![packaging.png](https://user-images.githubusercontent.com/47358913/159950478-2d090d1b-69b9"
  },
  {
    "path": "extras/packaging/linux/build.py",
    "chars": 2767,
    "preview": "import stat\nimport subprocess\nfrom pathlib import Path\nfrom typing import Iterator, Tuple\n\nBUILD_DIR = Path(__file__).pa"
  },
  {
    "path": "extras/packaging/linux/get_release_artifacts.sh",
    "chars": 471,
    "preview": "#!/bin/bash\n\nset -xe\n\nREPO_ROOT=../../../\nARTIFACTS_DIR=$(pwd)/artifacts\n\n# Reset the ARTIFACTS_DIR.\nrm -rf $ARTIFACTS_D"
  },
  {
    "path": "extras/packaging/linux/scripts/hooks/hook-pip.py",
    "chars": 377,
    "preview": "from pathlib import Path\nfrom PyInstaller.utils.hooks import collect_all\n\ndef hook(hook_api):\n    for pkg in [\n        '"
  },
  {
    "path": "extras/packaging/linux/scripts/http_cli.py",
    "chars": 97,
    "preview": "from httpie.__main__ import main\n\nif __name__ == '__main__':\n    import sys\n    sys.exit(main())\n"
  },
  {
    "path": "extras/packaging/linux/scripts/httpie_cli.py",
    "chars": 105,
    "preview": "from httpie.manager.__main__ import main\n\nif __name__ == '__main__':\n    import sys\n    sys.exit(main())\n"
  },
  {
    "path": "extras/profiling/README.md",
    "chars": 1545,
    "preview": "# HTTPie Benchmarking Infrastructure\n\nThis directory includes the benchmarks we use for testing HTTPie's speed and the\ni"
  },
  {
    "path": "extras/profiling/benchmarks.py",
    "chars": 5925,
    "preview": "\"\"\"\nThis file is the declaration of benchmarks for HTTPie. It\nis also used to run them with the current environment.\n\nEa"
  },
  {
    "path": "extras/profiling/run.py",
    "chars": 8612,
    "preview": "\"\"\"\nRun the HTTPie benchmark suite with multiple environments.\n\nThis script is configured in a way that, it will create\n"
  },
  {
    "path": "extras/scripts/generate_man_pages.py",
    "chars": 6038,
    "preview": "import os\nimport re\nfrom contextlib import contextmanager\nfrom pathlib import Path\nfrom typing import Optional, Iterator"
  },
  {
    "path": "httpie/__init__.py",
    "chars": 178,
    "preview": "\"\"\"\nHTTPie: modern, user-friendly command-line HTTP client for the API era.\n\n\"\"\"\n\n__version__ = '3.2.4'\n__date__ = '2024"
  },
  {
    "path": "httpie/__main__.py",
    "chars": 394,
    "preview": "\"\"\"The main entry point. Invoke as `http' or `python -m httpie'.\n\n\"\"\"\n\n\ndef main():\n    try:\n        from httpie.core im"
  },
  {
    "path": "httpie/adapters.py",
    "chars": 448,
    "preview": "from httpie.cli.dicts import HTTPHeadersDict\nfrom requests.adapters import HTTPAdapter\n\n\nclass HTTPieHTTPAdapter(HTTPAda"
  },
  {
    "path": "httpie/cli/__init__.py",
    "chars": 0,
    "preview": ""
  },
  {
    "path": "httpie/cli/argparser.py",
    "chars": 23132,
    "preview": "import argparse\nimport errno\nimport os\nimport re\nimport sys\nfrom argparse import RawDescriptionHelpFormatter\nfrom textwr"
  },
  {
    "path": "httpie/cli/argtypes.py",
    "chars": 7989,
    "preview": "import argparse\nimport getpass\nimport os\nimport sys\nfrom copy import deepcopy\nfrom typing import List, Optional, Union\n\n"
  },
  {
    "path": "httpie/cli/constants.py",
    "chars": 3246,
    "preview": "\"\"\"Parsing and processing of CLI input (args, auth credentials, files, stdin).\n\n\"\"\"\nimport enum\nimport re\n\n\nURL_SCHEME_R"
  },
  {
    "path": "httpie/cli/definition.py",
    "chars": 29137,
    "preview": "from __future__ import annotations\n\nimport os\nimport textwrap\nfrom argparse import FileType\n\nfrom httpie import __doc__,"
  },
  {
    "path": "httpie/cli/dicts.py",
    "chars": 2317,
    "preview": "from collections import OrderedDict\n\nfrom multidict import MultiDict, CIMultiDict\n\n\nclass BaseMultiDict(MultiDict):\n    "
  },
  {
    "path": "httpie/cli/exceptions.py",
    "chars": 38,
    "preview": "class ParseError(Exception):\n    pass\n"
  },
  {
    "path": "httpie/cli/nested_json/__init__.py",
    "chars": 497,
    "preview": "\"\"\"\nA library for parsing the HTTPie nested JSON key syntax and constructing the resulting objects.\n\n<https://httpie.io/"
  },
  {
    "path": "httpie/cli/nested_json/errors.py",
    "chars": 745,
    "preview": "from typing import Optional\n\nfrom .tokens import Token, HIGHLIGHTER\n\n\nclass NestedJSONSyntaxError(ValueError):\n    def _"
  },
  {
    "path": "httpie/cli/nested_json/interpret.py",
    "chars": 4339,
    "preview": "from typing import Type, Union, Any, Iterable, Tuple\n\nfrom .parse import parse, assert_cant_happen\nfrom .errors import N"
  },
  {
    "path": "httpie/cli/nested_json/parse.py",
    "chars": 5431,
    "preview": "from typing import Iterator\n\nfrom .errors import NestedJSONSyntaxError\nfrom .tokens import (\n    EMPTY_STRING,\n    BACKS"
  },
  {
    "path": "httpie/cli/nested_json/tokens.py",
    "chars": 1912,
    "preview": "from enum import Enum, auto\nfrom typing import NamedTuple, Union, Optional, List\n\nEMPTY_STRING = ''\nHIGHLIGHTER = '^'\nOP"
  },
  {
    "path": "httpie/cli/options.py",
    "chars": 7732,
    "preview": "import argparse\nimport textwrap\nimport typing\nfrom dataclasses import dataclass, field\nfrom enum import Enum, auto\nfrom "
  },
  {
    "path": "httpie/cli/requestitems.py",
    "chars": 7544,
    "preview": "import os\nimport functools\nfrom typing import Callable, Dict, IO, List, Optional, Tuple, Union\n\nfrom .argtypes import Ke"
  },
  {
    "path": "httpie/cli/utils.py",
    "chars": 2151,
    "preview": "import argparse\nfrom typing import Any, Callable, Generic, Iterator, Iterable, Optional, TypeVar\n\nT = TypeVar('T')\n\n\ncla"
  },
  {
    "path": "httpie/client.py",
    "chars": 13392,
    "preview": "import argparse\nimport http.client\nimport json\nimport sys\nfrom contextlib import contextmanager\nfrom time import monoton"
  },
  {
    "path": "httpie/compat.py",
    "chars": 3847,
    "preview": "import sys\nfrom ssl import SSLContext\nfrom typing import Any, Optional, Iterable\n\nfrom httpie.cookies import HTTPieCooki"
  },
  {
    "path": "httpie/config.py",
    "chars": 5005,
    "preview": "import json\nimport os\nfrom pathlib import Path\nfrom typing import Any, Dict, Union\n\nfrom . import __version__\nfrom .comp"
  },
  {
    "path": "httpie/context.py",
    "chars": 6737,
    "preview": "import argparse\nimport sys\nimport os\nimport warnings\nfrom contextlib import contextmanager\nfrom pathlib import Path\nfrom"
  },
  {
    "path": "httpie/cookies.py",
    "chars": 1069,
    "preview": "from http import cookiejar\n\n\n_LOCALHOST = 'localhost'\n_LOCALHOST_SUFFIX = '.localhost'\n\n\nclass HTTPieCookiePolicy(cookie"
  },
  {
    "path": "httpie/core.py",
    "chars": 10444,
    "preview": "import argparse\nimport os\nimport platform\nimport sys\nimport socket\nfrom typing import List, Optional, Union, Callable\n\ni"
  },
  {
    "path": "httpie/downloads.py",
    "chars": 11802,
    "preview": "\"\"\"\nDownload mode implementation.\n\n\"\"\"\nimport mimetypes\nimport os\nimport re\nfrom mailbox import Message\nfrom time import"
  },
  {
    "path": "httpie/encoding.py",
    "chars": 1385,
    "preview": "from typing import Union, Tuple\n\nfrom charset_normalizer import from_bytes\nfrom charset_normalizer.constant import TOO_S"
  },
  {
    "path": "httpie/internal/__build_channel__.py",
    "chars": 153,
    "preview": "# Represents the packaging method. This file should\n# be overridden by every build system we support on\n# the packaging "
  },
  {
    "path": "httpie/internal/__init__.py",
    "chars": 0,
    "preview": ""
  },
  {
    "path": "httpie/internal/daemon_runner.py",
    "chars": 1521,
    "preview": "import argparse\nfrom contextlib import redirect_stderr, redirect_stdout\nfrom typing import List\n\nfrom httpie.context imp"
  },
  {
    "path": "httpie/internal/daemons.py",
    "chars": 3403,
    "preview": "\"\"\"\nThis module provides an interface to spawn a detached task to be\nrun with httpie.internal.daemon_runner on a separat"
  },
  {
    "path": "httpie/internal/update_warnings.py",
    "chars": 5178,
    "preview": "import json\nfrom contextlib import nullcontext, suppress\nfrom datetime import datetime, timedelta\nfrom pathlib import Pa"
  },
  {
    "path": "httpie/legacy/__init__.py",
    "chars": 0,
    "preview": ""
  },
  {
    "path": "httpie/legacy/v3_1_0_session_cookie_format.py",
    "chars": 2905,
    "preview": "import argparse\nfrom typing import Any, Type, List, Dict, TYPE_CHECKING\n\nif TYPE_CHECKING:\n    from httpie.sessions impo"
  },
  {
    "path": "httpie/legacy/v3_2_0_session_header_format.py",
    "chars": 2078,
    "preview": "from typing import Any, Type, List, Dict, TYPE_CHECKING\n\nif TYPE_CHECKING:\n    from httpie.sessions import Session\n\n\nOLD"
  },
  {
    "path": "httpie/manager/__init__.py",
    "chars": 0,
    "preview": ""
  },
  {
    "path": "httpie/manager/__main__.py",
    "chars": 1707,
    "preview": "import argparse\nimport sys\n\nfrom typing import List, Union\n\nfrom httpie.context import Environment\nfrom httpie.status im"
  },
  {
    "path": "httpie/manager/cli.py",
    "chars": 5371,
    "preview": "from textwrap import dedent\nfrom httpie.cli.argparser import HTTPieManagerArgumentParser\nfrom httpie.cli.options import "
  },
  {
    "path": "httpie/manager/compat.py",
    "chars": 2001,
    "preview": "import sys\nimport shutil\nimport subprocess\n\nfrom contextlib import suppress\nfrom typing import List, Optional\nfrom httpi"
  },
  {
    "path": "httpie/manager/core.py",
    "chars": 1142,
    "preview": "import argparse\nfrom typing import Optional\n\nfrom httpie.context import Environment\nfrom httpie.status import ExitStatus"
  },
  {
    "path": "httpie/manager/tasks/__init__.py",
    "chars": 384,
    "preview": "from httpie.manager.tasks.sessions import cli_sessions\nfrom httpie.manager.tasks.export_args import cli_export_args\nfrom"
  },
  {
    "path": "httpie/manager/tasks/check_updates.py",
    "chars": 362,
    "preview": "import argparse\nfrom httpie.context import Environment\nfrom httpie.status import ExitStatus\nfrom httpie.internal.update_"
  },
  {
    "path": "httpie/manager/tasks/export_args.py",
    "chars": 701,
    "preview": "import argparse\nimport json\n\nfrom httpie.cli.definition import options\nfrom httpie.cli.options import to_data\nfrom httpi"
  },
  {
    "path": "httpie/manager/tasks/plugins.py",
    "chars": 8526,
    "preview": "import argparse\nimport os\nimport textwrap\nimport re\nimport shutil\nfrom collections import defaultdict\nfrom contextlib im"
  },
  {
    "path": "httpie/manager/tasks/sessions.py",
    "chars": 2686,
    "preview": "import argparse\n\nfrom httpie.sessions import SESSIONS_DIR_NAME, get_httpie_session\nfrom httpie.status import ExitStatus\n"
  },
  {
    "path": "httpie/models.py",
    "chars": 6483,
    "preview": "from time import monotonic\n\nimport requests\nfrom urllib3.util import SKIP_HEADER, SKIPPABLE_HEADERS\n\nfrom enum import En"
  },
  {
    "path": "httpie/output/__init__.py",
    "chars": 0,
    "preview": ""
  },
  {
    "path": "httpie/output/formatters/__init__.py",
    "chars": 0,
    "preview": ""
  },
  {
    "path": "httpie/output/formatters/colors.py",
    "chars": 13002,
    "preview": "import json\nfrom typing import Optional, Type, Tuple\n\nimport pygments.formatters\nimport pygments.lexer\nimport pygments.l"
  },
  {
    "path": "httpie/output/formatters/headers.py",
    "chars": 552,
    "preview": "from ...plugins import FormatterPlugin\n\n\nclass HeadersFormatter(FormatterPlugin):\n\n    def __init__(self, **kwargs):\n   "
  },
  {
    "path": "httpie/output/formatters/json.py",
    "chars": 1123,
    "preview": "import json\n\nfrom ...plugins import FormatterPlugin\n\n\nclass JSONFormatter(FormatterPlugin):\n\n    def __init__(self, **kw"
  },
  {
    "path": "httpie/output/formatters/xml.py",
    "chars": 2505,
    "preview": "from typing import TYPE_CHECKING, Optional\n\nfrom ...encoding import UTF8\nfrom ...plugins import FormatterPlugin\n\nif TYPE"
  },
  {
    "path": "httpie/output/lexers/__init__.py",
    "chars": 0,
    "preview": ""
  },
  {
    "path": "httpie/output/lexers/common.py",
    "chars": 517,
    "preview": "def precise(lexer, precise_token, parent_token):\n    # Due to a pygments bug*, custom tokens will look bad\n    # on outs"
  },
  {
    "path": "httpie/output/lexers/http.py",
    "chars": 3044,
    "preview": "import re\nimport pygments\nfrom httpie.output.lexers.common import precise\n\nRE_STATUS_LINE = re.compile(r'(\\d{3})( +)?(.+"
  },
  {
    "path": "httpie/output/lexers/json.py",
    "chars": 851,
    "preview": "import re\n\nfrom pygments.lexer import bygroups, using, RegexLexer\nfrom pygments.lexers.data import JsonLexer\nfrom pygmen"
  },
  {
    "path": "httpie/output/lexers/metadata.py",
    "chars": 1672,
    "preview": "import pygments\n\nfrom httpie.models import ELAPSED_TIME_LABEL\nfrom httpie.output.lexers.common import precise\n\nSPEED_TOK"
  },
  {
    "path": "httpie/output/models.py",
    "chars": 1400,
    "preview": "import argparse\nfrom typing import Any, Dict, Union, List, NamedTuple, Optional\n\nfrom httpie.context import Environment\n"
  },
  {
    "path": "httpie/output/processing.py",
    "chars": 1763,
    "preview": "import re\nfrom typing import Optional, List\n\nfrom ..plugins import ConverterPlugin\nfrom ..plugins.registry import plugin"
  },
  {
    "path": "httpie/output/streams.py",
    "chars": 8155,
    "preview": "from abc import ABCMeta, abstractmethod\nfrom itertools import chain\nfrom typing import Callable, Iterable, Optional, Uni"
  },
  {
    "path": "httpie/output/ui/__init__.py",
    "chars": 0,
    "preview": ""
  },
  {
    "path": "httpie/output/ui/man_pages.py",
    "chars": 1305,
    "preview": "\"\"\"Logic for checking and displaying man pages.\"\"\"\n\nimport subprocess\nimport os\nfrom httpie.context import Environment\n\n"
  },
  {
    "path": "httpie/output/ui/palette.py",
    "chars": 7226,
    "preview": "from dataclasses import dataclass, field\nfrom enum import Enum, auto\nfrom typing import Optional, List\n\n\nPYGMENTS_BRIGHT"
  },
  {
    "path": "httpie/output/ui/rich_help.py",
    "chars": 6565,
    "preview": "import re\nimport textwrap\nfrom typing import AbstractSet, Iterable, Optional, Tuple\n\nfrom rich.console import Renderable"
  },
  {
    "path": "httpie/output/ui/rich_palette.py",
    "chars": 2294,
    "preview": "from collections import ChainMap\nfrom typing import TYPE_CHECKING, Any, Optional\n\nif TYPE_CHECKING:\n    from rich.theme "
  },
  {
    "path": "httpie/output/ui/rich_progress.py",
    "chars": 3980,
    "preview": "from dataclasses import dataclass\nfrom typing import TYPE_CHECKING, Optional\n\nfrom httpie.context import Environment\n\nif"
  },
  {
    "path": "httpie/output/ui/rich_utils.py",
    "chars": 973,
    "preview": "import os\n\nfrom typing import Iterator\nfrom contextlib import contextmanager\n\nfrom rich.console import Console, Renderab"
  },
  {
    "path": "httpie/output/utils.py",
    "chars": 1066,
    "preview": "import json\nimport re\nfrom typing import Tuple\n\nfrom ..utils import load_json_preserve_order_and_dupe_keys\nfrom .lexers."
  },
  {
    "path": "httpie/output/writer.py",
    "chars": 6515,
    "preview": "import errno\nimport requests\nfrom typing import Any, Dict, IO, Optional, TextIO, Tuple, Type, Union\n\nfrom ..cli.dicts im"
  },
  {
    "path": "httpie/plugins/__init__.py",
    "chars": 299,
    "preview": "\"\"\"\nWARNING: The plugin API is still work in progress and will\n         probably be completely reworked in the future.\n\n"
  },
  {
    "path": "httpie/plugins/base.py",
    "chars": 4527,
    "preview": "from typing import Tuple\n\n\nclass BasePlugin:\n    # The name of the plugin, eg. \"My auth\".\n    name = None\n\n    # Optiona"
  },
  {
    "path": "httpie/plugins/builtin.py",
    "chars": 2120,
    "preview": "from base64 import b64encode\n\nimport requests.auth\n\nfrom .base import AuthPlugin\n\n\n# noinspection PyAbstractClass\nclass "
  },
  {
    "path": "httpie/plugins/manager.py",
    "chars": 4049,
    "preview": "import sys\nimport os\nimport warnings\n\nfrom itertools import groupby\nfrom operator import attrgetter\nfrom typing import D"
  },
  {
    "path": "httpie/plugins/registry.py",
    "chars": 560,
    "preview": "from .manager import PluginManager\nfrom .builtin import BasicAuthPlugin, DigestAuthPlugin, BearerAuthPlugin\nfrom ..outpu"
  },
  {
    "path": "httpie/sessions.py",
    "chars": 9705,
    "preview": "\"\"\"\nPersistent, JSON-serialized sessions.\n\n\"\"\"\nimport os\nimport re\n\nfrom http.cookies import SimpleCookie\nfrom http.cook"
  },
  {
    "path": "httpie/ssl_.py",
    "chars": 3406,
    "preview": "import ssl\nfrom typing import NamedTuple, Optional\n\n# noinspection PyPackageRequirements\nfrom urllib3.util.ssl_ import ("
  },
  {
    "path": "httpie/status.py",
    "chars": 987,
    "preview": "from enum import IntEnum, unique\n\n\n@unique\nclass ExitStatus(IntEnum):\n    \"\"\"Program exit status code constants.\"\"\"\n    "
  },
  {
    "path": "httpie/uploads.py",
    "chars": 7744,
    "preview": "import sys\nimport os\nimport zlib\nimport functools\nimport threading\nfrom typing import Any, Callable, IO, Iterable, Optio"
  },
  {
    "path": "httpie/utils.py",
    "chars": 9147,
    "preview": "import os\nimport base64\nimport json\nimport mimetypes\nimport re\nimport sys\nimport time\nimport tempfile\nimport sysconfig\n\n"
  },
  {
    "path": "pytest.ini",
    "chars": 278,
    "preview": "[pytest]\nmarkers =\n    # If you want to run tests without a full HTTPie installation\n    # we advise you to disable the "
  },
  {
    "path": "setup.cfg",
    "chars": 2627,
    "preview": "# Please keep all characters in this file in ASCII\n# distutils uses system's locale to interpret it and not everybody\n# "
  },
  {
    "path": "setup.py",
    "chars": 38,
    "preview": "from setuptools import setup\n\nsetup()\n"
  },
  {
    "path": "snapcraft.yaml",
    "chars": 3118,
    "preview": "name: httpie\ntitle: HTTPie\nsummary: Modern, user-friendly command-line HTTP client for the API era\ndescription: |\n  HTTP"
  },
  {
    "path": "tests/README.md",
    "chars": 147,
    "preview": "# HTTPie Test Suite\n\nPlease see [CONTRIBUTING](https://github.com/httpie/cli/blob/master/CONTRIBUTING.md) for contributi"
  },
  {
    "path": "tests/__init__.py",
    "chars": 0,
    "preview": ""
  },
  {
    "path": "tests/client_certs/client.crt",
    "chars": 1939,
    "preview": "-----BEGIN CERTIFICATE-----\nMIIFazCCA1OgAwIBAgIUNMIIO7cG2Lkx+qo0Z43k4+voT4swDQYJKoZIhvcNAQEN\nBQAwRTELMAkGA1UEBhMCQVUxEzA"
  },
  {
    "path": "tests/client_certs/client.key",
    "chars": 3243,
    "preview": "-----BEGIN RSA PRIVATE KEY-----\nMIIJKQIBAAKCAgEAqZ7/25xfKpEaBbtjP/m7cUeZEQwDKr2wYrxtheFKKd+5scFt\nGCRTojLcwje+sPCYBGa03h9"
  },
  {
    "path": "tests/client_certs/client.pem",
    "chars": 5182,
    "preview": "-----BEGIN CERTIFICATE-----\nMIIFazCCA1OgAwIBAgIUNMIIO7cG2Lkx+qo0Z43k4+voT4swDQYJKoZIhvcNAQEN\nBQAwRTELMAkGA1UEBhMCQVUxEzA"
  },
  {
    "path": "tests/client_certs/password_protected/client.key",
    "chars": 2546,
    "preview": "-----BEGIN RSA PRIVATE KEY-----\nProc-Type: 4,ENCRYPTED\nDEK-Info: AES-128-CBC,93DA845817852FB576163AA829C232E9\n\nVauvxiyC0"
  },
  {
    "path": "tests/client_certs/password_protected/client.pem",
    "chars": 1594,
    "preview": "-----BEGIN CERTIFICATE-----\nMIIEazCCAtOgAwIBAgIUIWojJySwCenyvcJrZY1aKOMQfTUwDQYJKoZIhvcNAQEL\nBQAwRTELMAkGA1UEBhMCQVUxEzA"
  },
  {
    "path": "tests/conftest.py",
    "chars": 2558,
    "preview": "import socket\n\nimport pytest\nfrom pytest_httpbin import certs\nfrom pytest_httpbin.serve import Server as PyTestHttpBinSe"
  },
  {
    "path": "tests/fixtures/.editorconfig",
    "chars": 109,
    "preview": "# https://editorconfig.org\n\n[{*.txt, *.json}]\ntrim_trailing_whitespace = false\ninsert_final_newline = false\n\n"
  },
  {
    "path": "tests/fixtures/__init__.py",
    "chars": 2091,
    "preview": "\"\"\"Test data\"\"\"\nimport json\nfrom pathlib import Path\nfrom typing import Optional, Dict, Any\n\nimport httpie\nfrom httpie.e"
  },
  {
    "path": "tests/fixtures/session_data/new/cookies_dict.json",
    "chars": 668,
    "preview": "{\n    \"__meta__\": {\n        \"about\": \"HTTPie session file\",\n        \"help\": \"https://httpie.io/docs#sessions\",\n        \""
  },
  {
    "path": "tests/fixtures/session_data/new/cookies_dict_dev_version.json",
    "chars": 668,
    "preview": "{\n    \"__meta__\": {\n        \"about\": \"HTTPie session file\",\n        \"help\": \"https://httpie.io/docs#sessions\",\n        \""
  },
  {
    "path": "tests/fixtures/session_data/new/cookies_dict_with_extras.json",
    "chars": 811,
    "preview": "{\n    \"__meta__\": {\n        \"about\": \"HTTPie session file\",\n        \"help\": \"https://httpie.io/docs#sessions\",\n        \""
  },
  {
    "path": "tests/fixtures/session_data/new/empty_cookies_dict.json",
    "chars": 283,
    "preview": "{\n    \"__meta__\": {\n        \"about\": \"HTTPie session file\",\n        \"help\": \"https://httpie.io/docs#sessions\",\n        \""
  },
  {
    "path": "tests/fixtures/session_data/new/empty_cookies_list.json",
    "chars": 283,
    "preview": "{\n    \"__meta__\": {\n        \"about\": \"HTTPie session file\",\n        \"help\": \"https://httpie.io/docs#sessions\",\n        \""
  },
  {
    "path": "tests/fixtures/session_data/new/empty_headers_dict.json",
    "chars": 283,
    "preview": "{\n    \"__meta__\": {\n        \"about\": \"HTTPie session file\",\n        \"help\": \"https://httpie.io/docs#sessions\",\n        \""
  },
  {
    "path": "tests/fixtures/session_data/new/empty_headers_list.json",
    "chars": 283,
    "preview": "{\n    \"__meta__\": {\n        \"about\": \"HTTPie session file\",\n        \"help\": \"https://httpie.io/docs#sessions\",\n        \""
  },
  {
    "path": "tests/fixtures/session_data/new/headers_cookies_dict_mixed.json",
    "chars": 829,
    "preview": "{\n    \"__meta__\": {\n        \"about\": \"HTTPie session file\",\n        \"help\": \"https://httpie.io/docs#sessions\",\n        \""
  },
  {
    "path": "tests/fixtures/session_data/new/headers_dict.json",
    "chars": 438,
    "preview": "{\n    \"__meta__\": {\n        \"about\": \"HTTPie session file\",\n        \"help\": \"https://httpie.io/docs#sessions\",\n        \""
  },
  {
    "path": "tests/fixtures/session_data/new/headers_dict_extras.json",
    "chars": 803,
    "preview": "{\n    \"__meta__\": {\n        \"about\": \"HTTPie session file\",\n        \"help\": \"https://httpie.io/docs#sessions\",\n        \""
  },
  {
    "path": "tests/fixtures/session_data/new/headers_list.json",
    "chars": 438,
    "preview": "{\n    \"__meta__\": {\n        \"about\": \"HTTPie session file\",\n        \"help\": \"https://httpie.io/docs#sessions\",\n        \""
  },
  {
    "path": "tests/fixtures/session_data/old/cookies_dict.json",
    "chars": 558,
    "preview": "{\n    \"__meta__\": {\n        \"about\": \"HTTPie session file\",\n        \"help\": \"https://httpie.io/docs#sessions\",\n        \""
  },
  {
    "path": "tests/fixtures/session_data/old/cookies_dict_dev_version.json",
    "chars": 563,
    "preview": "{\n    \"__meta__\": {\n        \"about\": \"HTTPie session file\",\n        \"help\": \"https://httpie.io/docs#sessions\",\n        \""
  },
  {
    "path": "tests/fixtures/session_data/old/cookies_dict_with_extras.json",
    "chars": 701,
    "preview": "{\n    \"__meta__\": {\n        \"about\": \"HTTPie session file\",\n        \"help\": \"https://httpie.io/docs#sessions\",\n        \""
  },
  {
    "path": "tests/fixtures/session_data/old/empty_cookies_dict.json",
    "chars": 277,
    "preview": "{\n    \"__meta__\": {\n        \"about\": \"HTTPie session file\",\n        \"help\": \"https://httpie.io/docs#sessions\",\n        \""
  },
  {
    "path": "tests/fixtures/session_data/old/empty_cookies_list.json",
    "chars": 277,
    "preview": "{\n    \"__meta__\": {\n        \"about\": \"HTTPie session file\",\n        \"help\": \"https://httpie.io/docs#sessions\",\n        \""
  },
  {
    "path": "tests/fixtures/session_data/old/empty_headers_dict.json",
    "chars": 277,
    "preview": "{\n    \"__meta__\": {\n        \"about\": \"HTTPie session file\",\n        \"help\": \"https://httpie.io/docs#sessions\",\n        \""
  },
  {
    "path": "tests/fixtures/session_data/old/empty_headers_list.json",
    "chars": 277,
    "preview": "{\n    \"__meta__\": {\n        \"about\": \"HTTPie session file\",\n        \"help\": \"https://httpie.io/docs#sessions\",\n        \""
  },
  {
    "path": "tests/fixtures/session_data/old/headers_cookies_dict_mixed.json",
    "chars": 613,
    "preview": "{\n    \"__meta__\": {\n        \"about\": \"HTTPie session file\",\n        \"help\": \"https://httpie.io/docs#sessions\",\n        \""
  },
  {
    "path": "tests/fixtures/session_data/old/headers_dict.json",
    "chars": 326,
    "preview": "{\n    \"__meta__\": {\n        \"about\": \"HTTPie session file\",\n        \"help\": \"https://httpie.io/docs#sessions\",\n        \""
  },
  {
    "path": "tests/fixtures/session_data/old/headers_dict_extras.json",
    "chars": 691,
    "preview": "{\n    \"__meta__\": {\n        \"about\": \"HTTPie session file\",\n        \"help\": \"https://httpie.io/docs#sessions\",\n        \""
  },
  {
    "path": "tests/fixtures/session_data/old/headers_list.json",
    "chars": 438,
    "preview": "{\n    \"__meta__\": {\n        \"about\": \"HTTPie session file\",\n        \"help\": \"https://httpie.io/docs#sessions\",\n        \""
  },
  {
    "path": "tests/fixtures/test.json",
    "chars": 99,
    "preview": "{\n    \"name\": \"Jakub Roztočil\",\n    \"unicode\": \"χρυσαφὶ 太陽 เลิศ ♜♞♝♛♚♝♞♜ оживлённым तान्यहानि 有朋\"\n}"
  },
  {
    "path": "tests/fixtures/test.txt",
    "chars": 112,
    "preview": "[one line of UTF8-encoded unicode text] χρυσαφὶ 太陽 เลิศ ♜♞♝♛♚♝♞♜ оживлённым तान्यहानि 有朋 ஸ்றீனிவாஸ ٱلرَّحْمـَبنِ"
  },
  {
    "path": "tests/fixtures/test_with_dupe_keys.json",
    "chars": 36,
    "preview": "{\"key\":15,\"key\":15,\"key\":3,\"key\":7}\n"
  },
  {
    "path": "tests/fixtures/xmldata/invalid/cyclic.xml",
    "chars": 81,
    "preview": "<!DOCTYPE xmlbomb [\n<!ENTITY a \"123 &b;\" >\n<!ENTITY b \"&a;\">\n]>\n<bomb>&a;</bomb>\n"
  },
  {
    "path": "tests/fixtures/xmldata/invalid/external.xml",
    "chars": 102,
    "preview": "<!DOCTYPE external [\n<!ENTITY ee SYSTEM \"http://www.w3schools.com/xml/note.xml\">\n]>\n<root>&ee;</root>\n"
  },
  {
    "path": "tests/fixtures/xmldata/invalid/external_file.xml",
    "chars": 104,
    "preview": "<!DOCTYPE external [\n<!ENTITY ee SYSTEM \"file:///PATH/TO/xmltestdata/simple.xml\">\n]>\n<root>&ee;</root>\n\n"
  },
  {
    "path": "tests/fixtures/xmldata/invalid/not-xml.xml",
    "chars": 11,
    "preview": "some string"
  },
  {
    "path": "tests/fixtures/xmldata/invalid/quadratic.xml",
    "chars": 103050,
    "preview": "<!DOCTYPE bomb [\n<!ENTITY a \"BBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB"
  },
  {
    "path": "tests/fixtures/xmldata/invalid/xalan_exec.xsl",
    "chars": 875,
    "preview": "<!-- Tested with xalan-j_2_7_1-bin.zip, Xerces-J-bin.2.11.0.tar.gz on\n     OpenJDK 1.7.0_15\n\n    $ LC_ALL=C java -cp xal"
  }
]

// ... and 61 more files (download for full content)

About this extraction

This page contains the full source code of the httpie/cli GitHub repository, extracted and formatted as plain text for AI agents and large language models (LLMs). The extraction includes 261 files (965.9 KB), approximately 253.9k tokens, and a symbol index with 1196 extracted functions, classes, methods, constants, and types. Use this with OpenClaw, Claude, ChatGPT, Cursor, Windsurf, or any other AI tool that accepts text input. You can copy the full output to your clipboard or download it as a .txt file.

Extracted by GitExtract — free GitHub repo to text converter for AI. Built by Nikandr Surkov.

Copied to clipboard!