Modern, user-friendly, programmable command-line HTTP client for the API.
Project description
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
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
- Tweet httpy at @KanidagliV on Twitter.
- Use StackOverflow to ask questions and include a
httpy
tag. - Create GitHub Issues for bug reports and feature requests.
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
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file httpy-cli-1.1.0.tar.gz
.
File metadata
- Download URL: httpy-cli-1.1.0.tar.gz
- Upload date:
- Size: 13.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.2
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | ba117f8c5e1bb873038973aebaa8ec9329e2a33e2a5417af42175c51b1fef754 |
|
MD5 | 825e1c7079d481bc708007fb8682edc8 |
|
BLAKE2b-256 | bf94e6e724cf364632f9fa3f05b73db4e79136916ea93ab57913024a24c7a1a1 |
File details
Details for the file httpy_cli-1.1.0-py3-none-any.whl
.
File metadata
- Download URL: httpy_cli-1.1.0-py3-none-any.whl
- Upload date:
- Size: 12.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.2
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0ab0221af5df525592eb161fe10237a7808916358602d85964b37e441de45d47 |
|
MD5 | 3da21b6763f432d752dffed3b27f4016 |
|
BLAKE2b-256 | 5a8d63bf9cbc3c3d64c73a11f746cdfc79823198f00b246d4066292d6632d587 |