Skip to content

Escape '-characters in httpie command line #2634

@mickeyl

Description

@mickeyl
❯ https HEAD https://sn.app-backend.eu/api/v1/user/me \
      'Host:sn.app-backend.eu' \
      'Accept-Encoding:gzip, deflate, br' \
      'Accept:*/*' \
      'User-Agent:de.schaknat.spc1/26.03.01.1 iOS/26.2 @ Mac13,2 (arm64)' \
      'X-TPE-UserId:6028DD69-CC2E-476B-B758-5E85549727F1 'iPhone 16e'' \
      'Accept-Language:de-DE,de;q=0.9' \
      'Connection:keep-alive'

When a custom header uses ' characters, the command line can break:

usage:
    http [METHOD] URL [REQUEST_ITEM ...]

error:
    argument REQUEST_ITEM: '16e' is not a valid value

for more information:
    run 'http --help' or visit https://httpie.io/docs/cli

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions