Skip to main content

HTTPie
Modern, user-friendly, programmable and filterable command-line HTTP client for the API

HTTPy is a command line HTTP client. Its purpose is to make duplicate web requests on a single line. httpy is designed for testing, debugging, and generally interacting with APIs and HTTP servers. The httpy command allows creating and sending arbitrary HTTP requests. They use simple and natural syntax and provide formatted and colored output. Under favour of its programmable structure, it can perform many tasks at the same time. For example, you can pull data for user IDs 0, 1, and 2 at the same time

httpy in action

Getting started

Installation instructions

pip install httpy-cli

Features

  • Expressive and intuitive syntax

  • Formatted and colorized terminal output

  • Programmable requests

    • Multiple requests one line

    • Value incremented each time

    • Random number per request

    • Read each value from the lines in the file

    • Value per each request as a list of multiple values

  • Built-in JSON support

  • Arbitrary request data

  • Custom headers

Structures

$ httpy <URL> <METHOD> <HEADERS,QUERIES,DATA> --exec <COMMAND>

Custom method, headers, queries and JSON data:

$ httpy httpbin.org/put PUT HeaderName:HeaderValue data=value query==value

Command

$ httpy httpbin.org/get --exec <KEY>:<OPERATION>:<MAX_RUN>

Examples

Basic Request:

$ httpy httpbin.org/get

Usage custom method, headers, queries and JSON data:

$ httpy httpbin.org/put PUT HeaderName:HeaderValue data=value query==value

Custom HTTP method, HTTP headers and JSON data:

$ httpy httpbin.org/post POST X-API-Token:123 name=John

Run 3 times:

$ httpy httpbin.org/get --exec i:++:3

Pass a value to URL:

$ httpy 'httpbin.org/get?value={i}' --exec i:VALUE

Pass a value to the URL by running it 2 times:

$ httpy 'httpbin.org/get?value={i}' --exec i:VALUE:2

Get 0, 1, 2, 3, 4, 5 post one line and just show body:

$ httpy https://jsonplaceholder.typicode.com/posts/{i} --exec i:++:6 -B

Pass a value to the Header and just show status:

$ httpy httpbin.org/get Authorization:{i} --exec i:token1,token2,token3 -S

Operation List

Operation Description
++ Increment
-- Deincrement
rand(0,10) Random number from 1 to 10
read(path/to/file) Read from file
item1, item2 List
item Text

Community & support

Contributing

Have a look through existing Issues and Pull Requests that you could help with. If you'd like to request a feature or report a bug, please create a GitHub Issue using one of the templates provided.

Sinan Kanidağlı © 2022

Release files for httpy-cli 1.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for httpy-cli 1.1.0
File Size Uploaded
httpy-cli-1.1.0.tar.gz 13.3 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for httpy-cli 1.1.0
File Interpreter ABI Platform
httpy_cli-1.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 25.5 kB

Release files / httpy-cli-1.1.0.tar.gz

Download URL httpy-cli-1.1.0.tar.gz
Size 13.3 kB
Tags Source
SHA-256 checksum
How to use checksums
ba117f8c5e1bb873038973aebaa8ec9329e2a33e2a5417af42175c51b1fef754
BLAKE2b-256 checksum
How to use checksums
bf94e6e724cf364632f9fa3f05b73db4e79136916ea93ab57913024a24c7a1a1
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.11.2

Release files / httpy_cli-1.1.0-py3-none-any.whl

Download URL httpy_cli-1.1.0-py3-none-any.whl
Size 12.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
0ab0221af5df525592eb161fe10237a7808916358602d85964b37e441de45d47
BLAKE2b-256 checksum
How to use checksums
5a8d63bf9cbc3c3d64c73a11f746cdfc79823198f00b246d4066292d6632d587
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.11.2

Release history Release notifications | RSS feed

This release

1.1.0 This release

2 release files

1.0.0

2 release files

0.0.4

2 release files

0.0.3

2 release files

0.0.2

2 release files

0.0.1

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page