Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
Rajesh_B
@raj2008_twitter
HTTPie 0.9.3
HTTPie data: /Users/XXXX/.httpie
Requests 2.9.1
Pygments 2.0.2
Python 2.7.10 (default, Jul 30 2016, 18:31:42)
[GCC 4.2.1 Compatible Apple LLVM 8.0.0 (clang-800.0.34)] darwin
Kyle Lawlor-Bagcal
@wgwz
@raj2008_twitter did you take a look here? https://github.com/jkbrzt/httpie#https
can you provide a small example which reproduces the issue?
Rajesh_B
@raj2008_twitter
@wgwz Yes I have looked at the details in the URL which you provided , still the same issue. Will provide example soon
Kyle Lawlor-Bagcal
@wgwz
@raj2008_twitter what happens when you http https://www.google.com? i get a 200 status code. no tweaks to my setup after pip install httpie
Rajesh_B
@raj2008_twitter
@wgwz I get 200 ok with http https://www.google.com , but when i try the same with one of my company internal URL i get connection aborted with this error message. http: error: ConnectionError: ('Connection aborted.', error(54, 'Connection reset by peer')) while doing GET request to URL
My company internal url works fine when I used curl command
Kyle Lawlor-Bagcal
@wgwz
ah, well. that's important to mention. bc it must be something internal than :)
perhaps ssl version?
@raj2008_twitter ^
Josiah Grace
@defjosiah
Hi, I am having trouble getting a working httpie command for what seems to be a very standard use-case, I think it has to do with output escaping, but it's pretty mystifying, if anyone could help out at all, that would be awesome

working curl

curl -H "Content-Type:application/json" -X POST -d '{"username":"a_username","password":"a_password"}' https://www.api.com/password

non-working httpie

http --json --debug POST $AUTH_URL username=$USERNAME password=$PASSWORD

non-working pipe from jq

http --json --debug POST $AUTH_URL username=$USERNAME password=$PASSWORD
cat auth.json | \
  jq -r '.username=env.USERNAME | .password=env.PASSWORD'
http --json POST $AUTH_URL

debug output

requests.request(**{
    "allow_redirects": false,
    "auth": "None",
    "cert": "None",
    "data": "{\"username\": \"a_username\", \"password\": \"a_password\"}",
    "files": {},
    "headers": {
        "Accept": "None",
        "Content-Type": "application/json",
        "User-Agent": "None"
    },
    "method": "post",
    "params": {},
    "proxies": {},
    "stream": true,
    "timeout": 30,
    "url": "https://www.api.com/password",
    "verify": true
})
Josiah Grace
@defjosiah
^feel free to ignore, I had the wrong password in my environment variable 🙃 lol
Dedsec1
@Dedsec1
anyone know if its possible to have httpie use an custom referer when in download mode?
Kyle Lawlor-Bagcal
@wgwz
@Dedsec1 that's something specified in the header right? so modifying the header will probably work... https://github.com/jkbrzt/httpie#http-headers
in fact there's a referer header in that example :)
i doubt it would change when in download mode
kikovipera
@kikovipera
Hi, is there any curl experts
I'm sending two requests to server - first to get sessionId and with second I'm sending cookies
on second request response is 302
sane results as httpie
Ed Schwab
@oedstero_twitter
love httpie, would like to see support for --resolve <host:address> ...
Ronny
@big-r81
Hi, httpie recognize the param value, but the output is wrong. I send 'http localhost:5984/jointest/_all_docs key=="2"' but the response is like if i sending the request without a parameter value! If I'm sending the request with curl, all is fine.
Matt Fieldhouse
@mfieldhouse
Hi everyone, how do I get the output color scheme shown on the httpie github page? It looks like the same color scheme as Sublime Text's Monokai theme.
Jakub Roztocil
@jakubroztocil

@mfieldhouse the style is called 'fruity'. See http --style=fruity httpbin.org/get.

You can also specify the default style via the config file.

gus4520
@gus4520
Hi there! I'm having a problem nesting a list in the httpie command. Here is what works in curl curl -k -n -H "Content-Type: application/json" -X POST https://mysystem.com/wapi/v2.2.2/record:host -d '{ "ipv4addrs":[{"configure_for_dhcp": false,"ipv4addr": "10.113.0.1"}],"name": "mattautotest.domain.com"}'
I can't seem to get httpie to pass the list for "ipv4addrs":[{"configure_for_dhcp": false,"ipv4addr": "10.113.0.1"}] no matter what I tryu
the system comes back and tells me ""List value expected for field: ipv4addrs""
wondering if anyone could help me with passing a list
DaveInMesa
@DaveInMesa
Hi. I'm brand new to Git and haven't even installed httpie, yet, but I want to report a tiny little issue that caused me quite a headache. I'm working through a python tutorial that uses the Git API to return essentially a directory listing of the repositories. One of the things being returned is the repository's Description. The Description for httpie, and probably many other repositories' descriptions, uses a dash/hyphen character that the Windows console can't map to anything displayable, so my Print command fails with "unicodeencodeerror: charmap can't encode character '\u2013'". That turns out to be the dash between 'client' and 'user-friendly' in the description, where it says "Modern command line HTTP client – user-friendly...". Python is nice enough to tell me the exact spot of the error, so I was able to identify the culprit and find a workaround (thanks, stackoverflow), but other people may be stumped by this and lose interest in learning Python. I wouldn't mention it if it was difficult to fix, but simply replacing that character with something that can be mapped to Windows is all that's needed.
Brian Demers
@bdemers
@jakubroztocil Is there a correct (and easy) way to add cli arguments to httpie plugins?
and it doesn't seem right
I also wanted to stick them in the auth section, but I didn't see a way to do that
Sourav Chatterjee
@chattes
Hi
How do i pipe a json output value to the next http command?
For example...
http POST :3000/signin/frontm | jq has id_token now this should be piped to next http command as a variable
Adarsh J
@adarshaj
What does jakubroztocil/httpie#529 need in order get merged? /cc @jakubroztocil - have been waiting on this for close to 9 months.. its a very nice feature to have which improves the UX a bunch
Anthony Olea
@anthonyolea
Hi everyone, I'm developing a server backend using http streams, I tried to use httpie to curl my route with this command: http -S --pretty=none http://127.0.0.1:8000/stream, but this is not working, I got a the whole response at once when the request finished
Eric Lee
@elee
Hi! Is httpie.org/run itself open source? I'm interested in running it for a demo I am doing in-house
Rubén Durán Balda
@ruduran
Hi all! I'm trying to write a FormatterPlugin and it would be really useful for me to be able to check the URL as a fallback, since I cannot always trust the minetype. Is there a way I can do that inside the plugin? I tried to check the doc but I didn't find much related to plugins and I'm new to this code so it may take me a while to find out. Thanks!
coding-at-work
@coding-at-work
I have an API endpoint that expects a literal "[abc]" in the path ... but httpie tries to be helpful and percent-encodes it. Is there a way to work around that?
curl -v 'http://localhost/endpoint/\[abc\]'
[...]
> GET /endpoint/[abc] HTTP/1.1
vs
http '/endpoint/[abc]' -v
GET /endpoint/%5Babc%5D HTTP/1.1
Elazar Leibovich
@elazarl
Is it possible to configure a specific header to be automatically added to a certain site? Context is, adding security token to all requests to gitlab
haakon storm heen
@haakonstorm
@elazarl : check out --session
Great. Elazar got his reply only ~10 months late.
So, i guess this isn't THE place to ask for user-questions ;)
But, in case somebody drops by... I'm leveraging httpie and http-prompt to simplify my interactions with IFTTT Webhooks.
IFTTT Webhooks come in the form
https://maker.ifttt.com/my-variable-stuff/then/a/long/ifttt/authentication/token/that/would/be/cool/to/template/away/somehow
....which I would love to call using something along:.....