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!
    mdtrooper@laptop:~$ 
    
    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!
    mdtrooper@laptop:~$
    

    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!
    mdtrooper@speccy:~$ 
    
    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
Python requests like API built on top of Twisted's HTTP client.

treq: High-level Twisted HTTP Client API treq is an HTTP library inspired by requests but written on top of Twisted's Agents. It provides a simple, hi

Twisted Matrix Labs 553 Dec 18, 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 4, 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
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 Jan 2, 2023
Small, fast HTTP client library for Python. Features persistent connections, cache, and Google App Engine support. Originally written by Joe Gregorio, now supported by community.

Introduction httplib2 is a comprehensive HTTP client library, httplib2.py supports many features left out of other HTTP libraries. HTTP and HTTPS HTTP

null 457 Dec 10, 2022
Asynchronous HTTP client/server framework for asyncio and Python

Async http client/server framework Key Features Supports both client and server side of HTTP protocol. Supports both client and server Web-Sockets out

aio-libs 13.1k Jan 1, 2023
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 5, 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
Aiosonic - lightweight Python asyncio http client

aiosonic - lightweight Python asyncio http client Very fast, lightweight Python asyncio http client Here is some documentation. There is a performance

Johanderson Mogollon 93 Jan 6, 2023
Probe and discover HTTP pathname using brute-force methodology and filtered by specific word or 2 words at once

pathprober Probe and discover HTTP pathname using brute-force methodology and filtered by specific word or 2 words at once. Purpose Brute-forcing webs

NFA 41 Jul 6, 2022
๐Ÿ”„ ๐ŸŒ Handle thousands of HTTP requests, disk writes, and other I/O-bound tasks simultaneously with Python's quintessential async libraries.

?? ?? Handle thousands of HTTP requests, disk writes, and other I/O-bound tasks simultaneously with Python's quintessential async libraries.

Hackers and Slackers 15 Dec 12, 2022
A Python obfuscator using HTTP Requests and Hastebin.

?? Jawbreaker ?? Jawbreaker is a Python obfuscator written in Python3, using double encoding in base16, base32, base64, HTTP requests and a Hastebin-l

Billy 50 Sep 28, 2022
Some example code for using a raspberry pi to draw text (including emojis) and twitch emotes to a HUB75 RGB matrix via an HTTP post endpoint.

Some example code for using a raspberry pi to draw text (including emojis) and twitch emotes to a HUB75 RGB matrix via an HTTP post endpoint.

null 7 Nov 5, 2022
EasyRequests is a minimalistic HTTP-Request Library that wraps aiohttp and asyncio in a small package that allows for sequential, parallel or even single requests

EasyRequests EasyRequests is a minimalistic HTTP-Request Library that wraps aiohttp and asyncio in a small package that allows for sequential, paralle

Avi 1 Jan 27, 2022
A simple, yet elegant HTTP library.

Requests Requests is a simple, yet elegant HTTP library. >>> import requests >>> r = requests.get('https://api.github.com/user', auth=('user', 'pass')

Python Software Foundation 48.8k Jan 5, 2023
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
Fast HTTP parser

httptools is a Python binding for the nodejs HTTP parser. The package is available on PyPI: pip install httptools. APIs httptools contains two classes

magicstack 1.1k Jan 7, 2023
HTTP/2 for Python.

Hyper: HTTP/2 Client for Python This project is no longer maintained! Please use an alternative, such as HTTPX or others. We will not publish further

Hyper 1k Dec 23, 2022
HTTP request/response parser for python in C

http-parser HTTP request/response parser for Python compatible with Python 2.x (>=2.7), Python 3 and Pypy. If possible a C parser based on http-parser

Benoit Chesneau 334 Dec 24, 2022