Questions tagged [httpie]

HTTPie is a command line HTTP client. Its goal is to make CLI interaction with web services as human-friendly as possible. It provides a simple http command that allows for sending arbitrary HTTP requests using a simple and natural syntax, and displays colorized responses. HTTPie can be used for testing, debugging, and generally interacting with HTTP servers.

Filter by
Sorted by
Tagged with
0 votes
0 answers
11 views

Set default options for localhost only

How can I set default options for localhost only? I want to always use --verify=false for localhost requests.
aleclarson's user avatar
  • 18.2k
0 votes
1 answer
43 views

Stuck at sending an array of numbers using HTTPie

I want to send this JSON using HTTPie: { name: 'John', phones: [ 1234, 5678 ] } And this is the parameters that I add to the httpie command: name=John phones[]:=1234 ...
Mohammad Miras's user avatar
0 votes
1 answer
67 views

Install HTTPie on Windows

I installed HTTPie on Windows using Chocolatey. However, doing it this way installs Python to a default location (C:\python312) that I don't want it to use. Is there a way to have Python install to ...
Neutrino's user avatar
  • 8,568
0 votes
0 answers
20 views

HTTPie can't find JSON file when testing POST

I am having trouble test the post functionality of my REST Java app via HTTPie. My syntax is "localhost:8080/coffees < coffee.json" I have coffee.json in the same package/folder as my ...
Macgyver72's user avatar
0 votes
1 answer
418 views

flask-HTTPTokenAuth Fails to Verify Token

I'm working my way through Miguel Grinberg's book Flask Web Development, and I've run into a snag in Chapter 14 (Application Programming Interfaces) with the authentication routine. I'm attempting to ...
Darwin von Corax's user avatar
0 votes
1 answer
544 views

Nested JSON not working as expected with HTTPie in Zsh

I can't figure out why sending nested JSON with HTTPie doesn't work as expected in Zsh. It looks like Zsh is trying to match bracket contents by default, but turning off matching (via noglob, nomatch, ...
Jim Miller's user avatar
0 votes
1 answer
361 views

Switching from CURL to HTTPie. Equivalent of CURL -T

I am working with cURL which is integrated into an xBase program. And the curl command line by me includes the option -T to download a local file to a CalDAV calendar. I tried to find it in HTTPie, ...
Dr_Oldwarez's user avatar
1 vote
1 answer
460 views

HTTP Request works in Postman but not in HTTPIE

I'm trying to make a simple http request to https://ip2country.info/ using httpie. For the life of me I can't get it to work. I'm trying to request to this URL: https://api.ip2country.info/ip?5.6.7.8 ...
bugsyb's user avatar
  • 5,682
2 votes
2 answers
958 views

Unable to run http command in Windows even after instaling

I ran the command 'pip install -U httpie' and it went fine: Windows Command Prompt saying "Requirement already satisfied: PySocks!=1.5.7,>=1.5.6 in c:\users'NAME'\appdata\local\packages\...
Alex Andra's user avatar
1 vote
1 answer
380 views

Does HTTPie have the equivalent of curl's -d option?

I want to query a REST API with HTTPie. I am usuale to do so with curl, with which I am able to specify maxKeys and startAfterFilename e.g. curl --location --request GET -G \ ...
Saverio Guzzo's user avatar
1 vote
1 answer
1k views

Add default headers for every request in httpie

I need to be able to either set in my httpie/config.json file to include some default headers (these are custom headers and not normal ones) to every request that i send from httpie by default (ALWAYS)...
Austin Crane's user avatar
2 votes
2 answers
1k views

How to show timing details with HTTPie

This blog post shows that you can show timing details, e.g: $ curl -w "@curl_format.txt" -o /dev/null -s https://jsonplaceholder.typicode.com/comments time_namelookup: 0.001478s ...
anta40's user avatar
  • 6,527
0 votes
0 answers
159 views

How to use jq between two httpie calls to filter a stream of JSON objects

Here is a minimum example of how to catch the output of the Twitter API Filtered Stream and to send it to another API, in this case a FastAPI project, using httpie according to an example use case in ...
mcnesium's user avatar
  • 1,423
2 votes
1 answer
2k views

Httpie how to only get response header only

In HTTPie how to get response header. When i call http https://staging3.website.com Host:staging3.website.com I get both header and body response. How to I get only the response header
kumar's user avatar
  • 8,297
2 votes
0 answers
376 views

Command / CLI based REST Http client to process bulk requests (i.e. like .http files)

Need a tool/setup in place that will trigger RESTful webAPI requests using a preformatted file (which contains Http request config and payload) .. like the .http file format supported by VScode REST ...
Hemant Tank's user avatar
  • 1,734
-3 votes
1 answer
384 views

httpie still use python 2.7 when python 3 is installed

I installed httpie via command sudo yum install httpie python3 command is on the PATH. But when I run http command it still use python 2.7 which cause error. http command error Traceback (most ...
zjffdu's user avatar
  • 25.6k
1 vote
1 answer
2k views

HMAC protected API and Postman request

I am trying to issue requests against an API which is HMAC protected. I can successfully send a request using a HMAC auth plugin for HTTPie like this: http --auth-type=hmackey --auth="key1:...
Carlos Gonzalez's user avatar
0 votes
2 answers
426 views

What output is used in bash (with HTTPie)?

I'm trying to analyze this command: $ http :"/hello" HTTP/1.1 401 Unauthorized <headers> <body> I'm trying to save the whole thing in a variable VAR=$( ... ) but to no avail so ...
JoeSlav's user avatar
  • 4,489
3 votes
1 answer
2k views

How to send POST request for Nested JSON using HTTPie?

I want to send POST request using HTTPie from Windows shell JSON input Looks Like: { "name": "pub1", "email": "[email protected]", "address"...
Ganesh Patil's user avatar
2 votes
2 answers
163 views

How can I enable tab-completion for `@` path options to HTTPie in fish?

HTTPie accepts paths as arguments with options that include the @ sign. Unfortunately, they don't seem to work with shell completions in fish. Instead, the option is treated as an opaque string. To ...
justfortherec's user avatar
2 votes
1 answer
1k views

Convert httpie post request to python requests library

I have difficulties converting a post request using htppie to python requests.post. This question is in general about how to do such a conversion, but I will use the specific request I was doing as an ...
Jonathan Lindgren's user avatar
0 votes
1 answer
389 views

UnicodeDecodeError: 'charmap' codec can't decode byte 0x9d in position 8024: character maps to <undefined> when re-directing output to disk

On Windows 10, I'm using httpie to retrieve data. It works fine when displaying on the screen, but as soon as I pipe the output to disk, I get http: error: UnicodeDecodeError: 'charmap' codec can't ...
Peter Kronenberg's user avatar
0 votes
0 answers
351 views

csrftoken in django rest framework - sending through HTTPIE

I'm trying to login through the http form, from DRF: > https://my.site.io/api-auth/login/ Using httpie, i generate a session.json to get the CSRFToken: $ http --session=why -h https://my.site.io/...
Souza's user avatar
  • 1,123
0 votes
1 answer
458 views

Is there a way to force httpie to use '%20' instead of '+' for spaces in query parameters?

Using httpie v2.3.0, I am interacting with a REST api that recognizes %20 but not + for space encodings in the values of query parameters. Is there a way to change httpie behavior to achieve the ...
seandavi's user avatar
  • 2,828
0 votes
1 answer
221 views

How to properly include parameters to a curl request

So, I was working with some integrations with Veracode, I need to use this XML API(createsandbox.do) The documentation recommends do use HTTPIe, and it works fine in my machine. However, we need to ...
Ricardo Lima's user avatar
0 votes
1 answer
133 views

Httpie auth plugin issues POST Request FORMAT

POST JSON body doesnt work with these plugins and have opened issues. Same POST Syntax I have successfully used with oauth, ntlm etc HAWK echo '{"hello": "world"}' | http POST ...
Artless's user avatar
  • 21
0 votes
0 answers
206 views

HTTPie Command from AWS Lambda (Python3.8)

I need to run HTTPie Command from withing the AWS Lambda I created a layer for HTTPie Added layer to my python function Running my HTTPie command from AWS Lambda which looks like below import ...
Artless's user avatar
  • 21
1 vote
1 answer
214 views

(Django) 'CommentView' object has no attribute 'body'

I have been trying to emulate comment functionality with a decorator. import json import jwt from django.views import View from django.http import JsonResponse from functools ...
Nicholas An's user avatar
0 votes
1 answer
421 views

(Django) Http POST request keeps returning bad request. I ran out of ideas regarding how to debug this

I have been trying to emulate Instagram login which takes either one of 'username', 'fullname', or 'email'. Below are the files for my 'account' Django app that I created: account/urls.py from ...
Nicholas An's user avatar
0 votes
1 answer
152 views

is there an option for httpie that is equivalent to curl's --path-as-is option

Is there an option for httpie that is equivalent to curl's --path-as-is? I want to send the GET request without some characters url encoded
ksr's user avatar
  • 15
1 vote
1 answer
395 views

HTTPie prompts for password

I am using HTTPie to make edgegrid authenticated calls to a set of REST APIs, but httpie always asks for password which hinders my ability to make calls in a shell script. The password is my localhost/...
Maximus's user avatar
  • 285
1 vote
1 answer
171 views

How to bundle httpie with httpie-aws-authv4 into Python zipapp?

It is straightforward to package httpie into a Python "PYZ" (zipapp), e.g. using $ pip install --upgrade zapp $ zapp httpie.pyz httpie.__main__:main httpie $ python ./httpie.pyz --version 1.0.3 Now ...
mgaert's user avatar
  • 2,348
1 vote
2 answers
470 views

How do I pass multiple query parameters by xargs into httpie?

I tried below to pass a parameters to httpie and it turned into POST method unexpectedly. 1) $ echo "a1 b1" | xargs -t -n2 bash -c 'http -v https://httpbin.org/anything arg1==$0 arg2==$1' bash -c ...
Yusuwa's user avatar
  • 21
0 votes
1 answer
616 views

Problem with HTTPie installation on macOS

Terminal during installation indicates such a problem: MacBook-Pro:~ synkevych$ brew install httpie Error: The following formula [#<Dependency: "python" []>, #<Options: []>] cannot be ...
Roman's user avatar
  • 753
0 votes
1 answer
944 views

How to pipe header information of a httpie request in bash?

I am making a HEAD request against this file location using httpie: $ http HEAD https://dbeaver.io/files/dbeaver-ce_latest_amd64.deb HTTP/1.1 302 Moved Temporarily Connection: keep-alive Content-...
k0pernikus's user avatar
  • 60.8k
0 votes
1 answer
117 views

can't receive monzo access token using axios

I've been trying for the whole day to perform a post request using axios in react (I'm trying to get an access_token for a Monzo app). I've followed the instructions here and they work perfectly when ...
linuxfever's user avatar
  • 3,773
0 votes
0 answers
14 views

Is there a way to query a website for a url with incorrect case?

I have this zsh function that finds the readme of github projects from their root link (e.g., https://github.com/Mortennn/Dozer -> https://github.com/Mortennn/Dozer/blob/master/README.md). Because the ...
HappyFace's user avatar
  • 3,489
2 votes
1 answer
2k views

How to use HTTPie to send an un-named JSON array

I have an API I want to invoke that wants something like this to be POSTed in the body: ["foo","bar"] I have read the official docs and can't see how to do this, is it possible? I ...
Michael Ray Lovett's user avatar
2 votes
1 answer
1k views

Flask app - query parameters dropping out of request args

I have a simple Flask app (Flask version 1.0.3) with a single app. URL /ask and handler to process a POST query string of (name, value) pairs, but the request.args object is not storing all the ...
srm's user avatar
  • 558
7 votes
1 answer
15k views

How to use httpie and jq within docker?

How to use httpid and jq within docker? I want to get the ip only in json result like '34.10.12.40' docker run -it --rm blacktop/httpie -b ifconfig.co/json { "country": "United States", "...
Leo Chu's user avatar
  • 83
0 votes
1 answer
887 views

How to debug my HTTPie or Postman so Akamai FastPurge API can make successful calls?

I wanted to use HTTPie or Postman to snip together a request for the Akamai FastPurge API, so I could see the structure and HTTP request as a whole with the aim to build a java module that builds the ...
Fuchs's user avatar
  • 133
2 votes
1 answer
177 views

Specific HTML parsing with Python 3 and BeautifulSoup

I am trying to parse the info in the bottom right table of the following link, the table that says Current schedule submissions: dnedesign.us.to/tables/ I was able to parse it down to: {s:12:"...
Neil Nabil Il Saidawi's user avatar
0 votes
1 answer
717 views

Make POST call with XML payload with HTTPie

Is there equivalent way to make this cURL call with HTTPie? curl -k -d '<?xml version="1.0" encoding="UTF-8"?><methodCall><methodName>wp.getUsersBlogs</...
crmpicco's user avatar
  • 16.7k
1 vote
2 answers
4k views

Wordpress XML-RPC POST returning -32700 error with php-xml extension installed

I am using HTTPie to do a POST request to my local Wordpress installation with the aim of checking if XML-RPC is available and enabled. http --verify=no POST https://crmpicco.localhost/xmlrpc.php ...
crmpicco's user avatar
  • 16.7k
1 vote
0 answers
171 views

How to send POST to MongoDB Atlas using HTTPie?

I'm attempting to test my REST API by making a POST request to a MongoDB cloud Atlas DB server. I know Postman is available, but I wanted to use something different like Httpie. I already checked this ...
Khalil Saboor's user avatar
0 votes
0 answers
62 views

Host a Httpie Server

I have a webapp with API documentation where the examples have the users using httpie to make requests. It would be extremely useful if the user could follow along on the same screen on a terminal, ...
Magger's user avatar
  • 83
-1 votes
1 answer
253 views

Cannot background HTTPie http request with `&` in .sh script

How come this works from the BASH prompt: /testproj> http http://localhost:5000/ping/ & [1] 10733 (env) /testproj> HTTP/1.0 200 OK Content-Length: 2 Content-Type: application/json Date: ...
P i's user avatar
  • 29.2k
0 votes
1 answer
441 views

Powershell HTTPIE

I'm trying to POST the following but I keep getting an error: "http: error: argument REQUEST_ITEM: "with" is not a valid value" http POST https://someurl.com fields:='{\"example-api-identifier\":\"...
imanidiot's user avatar
0 votes
1 answer
763 views

How to send a POST request in httpie including quotes?

I use httpie in the windows shell. My command looks like this: http --form -v POST "http://192.168.1.1/set/time" category=Time settings={"timezone":"Universal","ntp":{"enable":"no"},"time":"11:19:53",...
tempusstabilo's user avatar
2 votes
0 answers
192 views

HTTPie returning "Error processing request. All request parts must have the content-type header set."

I'm testing an API with HTTPie. The implementation notes of the method I'm trying to use states that it accepts a multipart query containing a model in JSON format (Content-Type=application/json) and ...
JG Trindade's user avatar