An interactive command-line HTTP and API testing client built on top of HTTPie featuring autocomplete, syntax highlighting, and more. https://twitter.com/httpie

Overview
Comments
  • Feature proposal: saving current request setup under named alias

    Feature proposal: saving current request setup under named alias

    This is great package, thanks for sharing your work!

    As I've been using it couple of days I noticed that it's quite inconvenient, having to repeatedly change request settings every time I want to send different request.
    The option of saving current state of request would solve the problem.

    Given this output of httpie post:

    http://127.0.0.1:3000/api/oauth/token> http --form --style native POST http://127.0.0.1:3000/api/oauth/token user_id==value client_id=value client_secret=value grant_type=password password=test  username=testuser1 Content-Type:application/x-www-form-urlencoded
    

    We could use eg.: http://127.0.0.1:3000/api/oauth/token> alias getToken

    which would save the request under getToken keyword. Later, we could call getToken request and optionally overwrite any req options like so:

    http://127.0.0.1:3000/api/oauth/token> getToken username=testuser2 password=test2
    
    enhancement 
    opened by fogine 17
  • Installation fails on system-wide install on os.x

    Installation fails on system-wide install on os.x

    From the debug log:

    Cleaning up...
      Removing temporary dir /private/tmp/pip_build_root...
    Exception:
    Traceback (most recent call last):
      File "/Library/Python/2.7/site-packages/pip-1.5.6-py2.7.egg/pip/basecommand.py", line 122, in main
        status = self.run(options, args)
      File "/Library/Python/2.7/site-packages/pip-1.5.6-py2.7.egg/pip/commands/install.py", line 283, in run
        requirement_set.install(install_options, global_options, root=options.root_path)
      File "/Library/Python/2.7/site-packages/pip-1.5.6-py2.7.egg/pip/req.py", line 1431, in install
        requirement.uninstall(auto_confirm=True)
      File "/Library/Python/2.7/site-packages/pip-1.5.6-py2.7.egg/pip/req.py", line 598, in uninstall
        paths_to_remove.remove(auto_confirm)
      File "/Library/Python/2.7/site-packages/pip-1.5.6-py2.7.egg/pip/req.py", line 1836, in remove
        renames(path, new_path)
      File "/Library/Python/2.7/site-packages/pip-1.5.6-py2.7.egg/pip/util.py", line 295, in renames
        shutil.move(old, new)
      File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/shutil.py", line 302, in move
        copy2(src, real_dst)
      File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/shutil.py", line 131, in copy2
        copystat(src, dst)
      File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/shutil.py", line 103, in copystat
        os.chflags(dst, st.st_flags)
    OSError: [Errno 1] Operation not permitted: '/tmp/pip-ZBkEd1-uninstall/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/six-1.4.1-py2.7.egg-info'
    
    help wanted installation 
    opened by ralphschindler 15
  • Refactor env, source, and exec

    Refactor env, source, and exec

    Refactor PR #73.

    • Cover more edge cases
    • Add more test cases
    • Make code more Pythonic
    • Abandon JSON in favor of "http-prompt script" for persistent context
    • Fix an autocomplete bug

    @fogine Would you like to review it?

    opened by eliangcs 13
  • Support for sending body data that isn't in key:value format

    Support for sending body data that isn't in key:value format

    We should support somehow sending request body data as raw string. Without the requirement of providing key=value pair. This is related to jkbrzt/httpie#399 . In the httpie library, the issue is solved by command input redirection... Eg.:

    echo 'some string value' | http POST example.com/person/1
    

    Which sort of complicates things for this library... I'm not sure how we should approach this.

    enhancement 
    opened by fogine 10
  • Add shell command integration

    Add shell command integration

    • [x] Execute any strings in backticks as shell commands
    • [x] Shell command lexer (syntax highlighting)
    • [x] Shell command completer
    • [x] Sync with master and resolve conflicts
    opened by eliangcs 10
  • Features/env, source and exec commands + basic unix pipelines

    Features/env, source and exec commands + basic unix pipelines

    Solves #70

    Adds new commands: env, source, exec
    Adds output redirection feature:

    > post query==value > /tmp/request.log # writes response to the file
    > post query==value >> /tmp/request.log # appends response to the file ( or creates a new file if it does not exists)
    > post query==value | tee [-a,--append] /tmp/request.log # appends or writes to the files and simultaneously prints the response to a console
    

    Changed behavior of automatic context saving... It saves only current session to single file. It's like backup of a unsaved session.

    Covered by tests Readme file with starting guide updated... so it reflects the new features

    opened by fogine 9
  • multiple querystring params ignored

    multiple querystring params ignored

    Httpie supports sending multiple querystring args with the same key. http-prompt uses a dict behind the scenes and therefore only calls Httpie with a single value:

    http://localhost:6543/testing> httpie get par==1 par==2
    http GET http://localhost:6543/testing par==2
    

    This should result in:

    http://localhost:6543/testing> httpie get par==1 par==2
    http GET http://localhost:6543/testing par==1 par==2
    
    enhancement todo 
    opened by jgelens 7
  • Update to prompt_toolkit 2.0.x - take over jonathanslenders's works

    Update to prompt_toolkit 2.0.x - take over jonathanslenders's works

    I patched jonathanslenders's works into the latest source.

    I don't know why this update stop for a long time, and creating new pull request is good manner or not, but I think http-prompt works with prompt_tookit 2.0.x is things I need.

    Almost changes is the same as jonathanslenders's. I added only information message for KeyboardInterrupt exception on http_prompt/cli.py:169.

    opened by boarnasia 6
  • [WIP] Upgrade to prompt_toolkit 2.0

    [WIP] Upgrade to prompt_toolkit 2.0

    These are the changes required for upgrading to prompt_toolkit 2.0 once it's released.

    Do you need asynchronous autocompletion or not? By default, completion is synchronous, but we can make it async if completion takes too much time.

    opened by jonathanslenders 6
  • Add Dockerfile for building docker container

    Add Dockerfile for building docker container

    Not sure if this is something appropriate in the repo, but I'm a fan of leveraging docker for running tools.

    To build:

    docker build -t http-prompt .
    

    and to run:

    docker run -it --rm http-prompt
    

    If this is appropriate, next steps would be setting up an automated build on docker/hub that would build on every merge etc. I've done that already for my fork here https://hub.docker.com/r/frosforever/http-prompt/. The image can be pulled down and run via:

    docker run -it --rm frosforever/http-prompt
    

    See https://docs.docker.com/docker-hub/builds/ for the steps required to set up an automated build.

    opened by frosforever 6
  • issue #172: spec/buggy Path/Operation handling

    issue #172: spec/buggy Path/Operation handling

    Current code expect Path object to contain only method/Operation declaration. Path object may contain $ref, summary, description, servers and parameters entries.

    If available, this entries are default values to apply children Operation.

    This fix drops unused entries ($ref, summary, description, servers) and merge parameters:

    • unicity based on name/in unicity
    • Operation value takes precedence

    This fix allows to parse spec file attached with #172

    opened by lalmeras 5
  • Cookies auto setting invalid.

    Cookies auto setting invalid.

    Function get_response has been removed at https://github.com/httpie/httpie/commit/bece3c77bb51ecc55dcc4008375dc29ccd91575c . So that the tracing in https://github.com/httpie/http-prompt/pull/71/files#diff-0cd13edf0d54ff93c4d296836ba8d5a69462b2d7f33113b9e0fb92a9af980803R297 is no longer work.

    opened by qwIvan 0
  • Investigate increasing Maintainer Productivity with Pull Requests Environments

    Investigate increasing Maintainer Productivity with Pull Requests Environments

    I would like to make life easier for HTTP Prompt maintainers by implementing Uffizzi previews. Disclaimer: I work on Uffizzi Uffizzi is a Open Source full stack previews engine and is completely free for HTTP Prompt (and all open source projects). This will provide maintainers with previews of their PRs in the cloud, allowing them iterate faster and reduce time to merge.

    TODO:

    • [ ] Intial POC
    opened by waveywaves 0
  • how to remove pager?

    how to remove pager?

    I don't know python but I do know several other languages so could someone tell me how do I remove the pager? what specific file or line would be appreciative as I use my own scrollbar and buffer and do NOT want to use more or less or anything I just want it to display the results at the bottom

    opened by gittyup2018 2
  • The command line param -v show the version but launch the cli

    The command line param -v show the version but launch the cli

    It is a tiny bug but it is annoying.

    It is related with #208 .

    The command line long param runs fine:

    $ http-prompt --version
    2.1.0
    $
    

    But the short command line fails:

    $ http-prompt -v
    Version: 2.1.0
    http://-v>                                                                                                                                                                                                                                    
    Goodbye!
    [email protected]:~$ 
    
    opened by mdtrooper 0
  • The command line param --auth is showed as url

    The command line param --auth is showed as url

    It is a tiny bug but it is annoying.

    I have the version:

    $ http-prompt --version
    2.1.0
    

    I write a example without --auth :

    $ http-prompt --spec=http://127.0.0.1:8080/v2/api-docs
    Version: 2.1.0
    https://127.0.0.1:8080/>                                                                                                                                                                                                                      
    Goodbye!
    [email protected]:~$
    

    And it is with --auth :

    $ http-prompt --spec=http://127.0.0.1:8080/v2/api-docs --auth=foo:bar
    Version: 2.1.0
    http://--auth=foo:bar>                                                                                                                                                                                                                        
    Goodbye!
    [email protected]:~$ 
    
    opened by mdtrooper 0
  • Support for setting variables based on response data

    Support for setting variables based on response data

    It would be nice to be able to set variables for a future request (or cd to a path) based on the previous response data. Something like JSONpath syntax would be simple yet effective:

    Response body:
    
    {
      "id": "17f96808-886a-452e-bbc7-956d27c6cd9d",
      ...
    }
    
    > fooId=$.id
    
    > cd $.id
    
    opened by sarumont 0
Releases(v2.1.0)
  • v2.1.0(Mar 5, 2021)

    • Fixed compatibility with HTTPie v2.x.
    • Improved OpenAPI support.
    • Removed Python 2 support.

    Join our Discord community: https://httpie.io/chat

    Source code(tar.gz)
    Source code(zip)
  • v2.0.0(Mar 5, 2021)

  • v1.0.0(Nov 4, 2018)

    • Add HTTP CONNECT method (#144)
    • Add clear command (#126)
    • Fix bug: root path / leads to crash (#145)
    • Fix bug: Cookie related AttributeError on Python 2 (#145)
    Source code(tar.gz)
    Source code(zip)
  • v0.11.2(Mar 7, 2018)

  • v0.11.1(Jan 6, 2018)

  • v0.11.0(Oct 24, 2017)

    • Add --env CLI option to preload environment (#131, #132)
    • Add support for persistent history (#130)
    • Drop Python 2.6 support (#129)
    • Ignore data.json generated from tests (#128)
    Source code(tar.gz)
    Source code(zip)
  • v0.10.2(Aug 2, 2017)

    • Fix typos in documentation (#119, #121)
    • Use tuples inside of str.startswith (#122)
    • Remove extra argument from six.u (#123)
    • Conditionally install ordereddict package on Python 2.6 (#124)
    Source code(tar.gz)
    Source code(zip)
  • v0.10.1(May 11, 2017)

  • v0.10.0(Apr 16, 2017)

  • v0.9.3(Mar 27, 2017)

  • v0.9.2(Feb 15, 2017)

    • Fix bug: Unable to escape separator in paramter name (#106)
    • Fix bug: rm -b autocomplete for raw json paramters (29e0895)
    • Fix bug: Cursor being reset to position 0 (#107)
    • Fix bug: UnboundLocalError on 'new_opts' (#110)
    Source code(tar.gz)
    Source code(zip)
  • v0.9.1(Jan 23, 2017)

  • v0.9.0(Jan 15, 2017)

  • v0.8.0(Nov 16, 2016)

    • Add support for OPTIONS method (#84)
    • Fix highlighting bug with parameters starting with HTTP method names (#86)
    • Fix excessive newlines after headers and body (#89)
    Source code(tar.gz)
    Source code(zip)
  • v0.7.0(Oct 22, 2016)

    • New feature: Shell substitution (#54, #61, #74)
    • New feature: Piping to shell (#61, #74)
    • New feature: Be able to delete all parameters of a given type (#79)
    Source code(tar.gz)
    Source code(zip)
  • v0.6.0(Sep 18, 2016)

    • New feature: env command (#70, #73)
    • New feature: output redirection (#70, #73)
    • New feature: source and exec commands (#70, #73)
    • Remove grouped-by-hostname persistent contexts (#70, #73)
    • Change default URL to http://localhost:8000 (#78)
    • Change persistent context format from JSON to "http-prompt script" (#78)
    Source code(tar.gz)
    Source code(zip)
  • v0.5.0(Sep 16, 2016)

Owner
HTTPie
API tools for humans. We’re hiring — https://httpie.io/jobs
HTTPie
T-Reqs: A grammar-based HTTP Fuzzer

T-Reqs HTTP Fuzzer T-Reqs (Two Requests) is a grammar-based HTTP Fuzzer written as a part of the paper titled "T-Reqs: HTTP Request Smuggling with Dif

Bahruz Jabiyev 207 Dec 06, 2022
HTTP Request & Response Service, written in Python + Flask.

httpbin(1): HTTP Request & Response Service

Postman Inc. 11.3k Jan 01, 2023
Asynchronous Python HTTP Requests for Humans using twisted

Asynchronous Python HTTP Requests for Humans Small add-on for the python requests http library. Makes use twisted's ThreadPool, so that the requests'A

Pierre Tardy 32 Oct 27, 2021
HackerNews digest using GitHub actions

HackerNews Digest This script makes use of GitHub actions to send daily newsletters with the top 10 posts from HackerNews of the previous day. How to

Rajkumar S 3 Jan 19, 2022
💡Python package for HTTP/1.1 style headers. Parse headers to objects. Most advanced available structure for http headers.

HTTP Headers, the Complete Toolkit 🧰 Object-oriented headers. Kind of structured headers. ❓ Why No matter if you are currently dealing with code usin

TAHRI Ahmed R. 103 Dec 02, 2022
HTTP Request Smuggling Detection Tool

HTTP Request Smuggling Detection Tool HTTP request smuggling is a high severity vulnerability which is a technique where an attacker smuggles an ambig

Anshuman Pattnaik 282 Jan 03, 2023
suite de mocks http em json

Ritchie Formula Repo Documentation Contribute to the Ritchie community This repository contains rit formulas which can be executed by the ritchie-cli.

Kaio Fábio Prates Prudêncio 1 Nov 01, 2021
Python Client for the Etsy NodeJS Statsd Server

Introduction statsd is a client for Etsy's statsd server, a front end/proxy for the Graphite stats collection and graphing server. Links The source: h

Rick van Hattem 107 Jun 09, 2022
Asynchronous Python HTTP Requests for Humans using Futures

Asynchronous Python HTTP Requests for Humans Small add-on for the python requests http library. Makes use of python 3.2's concurrent.futures or the ba

Ross McFarland 2k Dec 30, 2022
PycURL - Python interface to libcurl

PycURL -- A Python Interface To The cURL library PycURL is a Python interface to libcurl, the multiprotocol file transfer library. Similarly to the ur

PycURL 933 Jan 09, 2023
Script to automate PUT HTTP method exploitation to get shell.

Script to automate PUT HTTP method exploitation to get shell.

devploit 116 Nov 10, 2022
Aiohttp simple project with Swagger and ccxt integration

crypto_finder What Where Documentation http://localhost:8899/docs Maintainer nordzisko Crypto Finder aiohttp application Application that connects to

Norbert Danisik 5 Feb 27, 2022
Screaming-fast Python 3.5+ HTTP toolkit integrated with pipelining HTTP server based on uvloop and picohttpparser.

Screaming-fast Python 3.5+ HTTP toolkit integrated with pipelining HTTP server based on uvloop and picohttpparser.

Paweł Piotr Przeradowski 8.6k Jan 04, 2023
hackhttp2 make everything easier

hackhttp2 intro This repo is inspired by hackhttp, but it's out of date already. so, I create this repo to make simulation and Network request easier.

youbowen 5 Jun 15, 2022
A next generation HTTP client for Python. 🦋

HTTPX - A next-generation HTTP client for Python. HTTPX is a fully featured HTTP client for Python 3, which provides sync and async APIs, and support

Encode 9.8k Jan 05, 2023
A minimal HTTP client. ⚙️

HTTP Core Do one thing, and do it well. The HTTP Core package provides a minimal low-level HTTP client, which does one thing only. Sending HTTP reques

Encode 306 Dec 27, 2022
As easy as /aitch-tee-tee-pie/ 🥧 Modern, user-friendly command-line HTTP client for the API era. JSON support, colors, sessions, downloads, plugins & more. https://twitter.com/httpie

HTTPie: human-friendly CLI HTTP client for the API era HTTPie (pronounced aitch-tee-tee-pie) is a command-line HTTP client. Its goal is to make CLI in

HTTPie 25.4k Jan 01, 2023
Python HTTP library with thread-safe connection pooling, file post support, user friendly, and more.

urllib3 is a powerful, user-friendly HTTP client for Python. Much of the Python ecosystem already uses urllib3 and you should too. urllib3 brings many

urllib3 3.2k Dec 29, 2022
Aiohttp-openmetrics - OpenMetrics endpoint provider for aiohttp

aiohttp-openmetrics This project contains a simple middleware and /metrics route

Jelmer Vernooij 1 Dec 15, 2022
Requests + Gevent = <3

GRequests: Asynchronous Requests GRequests allows you to use Requests with Gevent to make asynchronous HTTP Requests easily. Note: You should probably

Spencer Phillip Young 4.2k Dec 30, 2022