GithubHelp home page GithubHelp logo

httpie-go's People

Contributors

anatol avatar brandonbloom avatar chaoqing avatar danielgtaylor avatar golgoth31 avatar nojima avatar pmhahn avatar thehowl avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

httpie-go's Issues

Allow omission of METHOD argument

Positional な引数がひとつの場合:
第一引数を URL として解釈する。

Positional な引数がふたつ以上ある場合:
第一引数が ^[a-zA-Z]+$ にマッチするならば METHOD として解釈し、そうでなければ URL として解釈する。

Support --form option

From man of httpie:

--form, -f

Data items from the command line are serialized as form fields.

The Content-Type is set to application/x-www-form-urlencoded (if not specified). The presence of any file fields results in a multipart/form-data request.

output option is different from htttp-go to httppie

In httppie version 0.9.8 the output option works like so:

 --output FILE, -o FILE
      Save output to FILE instead of stdout. If --download is also set, then only
      the response body is saved to FILE. Other parts of the HTTP exchange are
      printed to stderr.

But in httpie-go 0.7.0 it works like so:

-o, --output=value output file

Therefore in httppie you would use:

http https://httpbin.org/get -o test.txt

but in http-go

http-go https://httpbin.org/get -o="test.txt"

I don't know if it is intended or not but it breaks compatibility

Support for digest and bearer auth

It appears that the current released version of httpie-go (0.7.0) lacks digest and bearer authentication support. My question is should these methods be supported as well?

Using --follow with --verbose, the redirects in the middle aren't displayed

httpie-go skips everything in the middle and shows the final result. HTTPie shows all the redirects and their related headers or bodies (respective of params).

HTTPie-go

➜  auth git:(gds) ht -Fvh https://google.com
HTTP/2.0 200 OK
Alt-Svc: h3=":443"; ma=2592000,h3-29=":443"; ma=2592000,h3-T051=":443"; ma=2592000,h3-Q050=":443"; ma=2592000,h3-Q046=":443"; ma=2592000,h3-Q043=":443"; ma=2592000,quic=":443"; ma=2592000; v="46,43"
Cache-Control: private, max-age=0
Content-Type: text/html; charset=ISO-8859-1
Date: Mon, 26 Jul 2021 21:45:40 GMT
Expires: -1
P3p: CP="This is not a P3P policy! See g.co/p3phelp for more info."
Server: gws
Set-Cookie: 1P_JAR=2021-07-26-21; expires=Wed, 25-Aug-2021 21:45:40 GMT; path=/; domain=.google.com; Secure
Set-Cookie: NID=220=PbsBwy_-qlQkTuwp-JCnTZDn1L1ejUzmdU6ntxNfPikOOSY01__hvR1WPG7wTpSCMG55jkcj1ScIz_6cNG7flk3Avfb6KKb2BH9Nv5f-vXanfdB23NdLn6LUcZPUkNrTh26S3L7sYSpb6OUMpDeYruSUM_GwVUDFbB-TrLir3JM; expires=Tue, 25-Jan-2022 21:45:40 GMT; path=/; domain=.google.com; HttpOnly
X-Frame-Options: SAMEORIGIN
X-Xss-Protection: 0

HTTPie (python)

➜  auth git:(gds) http -Fvh https://google.com
HTTP/1.1 301 Moved Permanently
Alt-Svc: h3=":443"; ma=2592000,h3-29=":443"; ma=2592000,h3-T051=":443"; ma=2592000,h3-Q050=":443"; ma=2592000,h3-Q046=":443"; ma=2592000,h3-Q043=":443"; ma=2592000,quic=":443"; ma=2592000; v="46,43"
Cache-Control: public, max-age=2592000
Content-Length: 220
Content-Type: text/html; charset=UTF-8
Date: Mon, 26 Jul 2021 21:45:52 GMT
Expires: Wed, 25 Aug 2021 21:45:52 GMT
Location: https://www.google.com/
Server: gws
X-Frame-Options: SAMEORIGIN
X-XSS-Protection: 0

HTTP/1.1 200 OK
Alt-Svc: h3=":443"; ma=2592000,h3-29=":443"; ma=2592000,h3-T051=":443"; ma=2592000,h3-Q050=":443"; ma=2592000,h3-Q046=":443"; ma=2592000,h3-Q043=":443"; ma=2592000,quic=":443"; ma=2592000; v="46,43"
Cache-Control: private, max-age=0
Content-Encoding: gzip
Content-Type: text/html; charset=ISO-8859-1
Date: Mon, 26 Jul 2021 21:45:53 GMT
Expires: -1
P3P: CP="This is not a P3P policy! See g.co/p3phelp for more info."
Server: gws
Set-Cookie: 1P_JAR=2021-07-26-21; expires=Wed, 25-Aug-2021 21:45:53 GMT; path=/; domain=.google.com; Secure
Set-Cookie: NID=220=ATD0Gaaal5313XDyFgcFsa8ENCW3IVbeN3oaO-SHsLvq5LZMZrmhgxtEkIu08j7ou_kt8HzxThBUA28uPJrAmopGHIIzqsAqgIE0oTHj1r4Wb0sGjqTDDBCf3-riucl0uCMC8LWgZkbPPP1P6apTqj374EFfJCkj1jlBbjVyuvE; expires=Tue, 25-Jan-2022 21:45:53 GMT; path=/; domain=.google.com; HttpOnly
Transfer-Encoding: chunked
X-Frame-Options: SAMEORIGIN
X-XSS-Protection: 0

can this also support force http2 only? and force http3 only?

was using the python httpie for debugging, but its shortcoming was HTTP1 only, tried to install some httpie-http2 plugin solution, but none of those works:

For uninstallations, please use either "httpie plugins uninstall httpie-http2" or "pip uninstall httpie-http2" (depending on how you installed it in the first place).

heard Golang library handles HTTP/2 binary protocols better, not sure can this have a feature to use http2 above only scenario ?

 --http1          force HTTP/1.1 protocol

 --http2          force HTTP/2 protocol ?? and 
 --http2+         force HTTP/2 protocol above?
 --http3          force HTTP/3 protocol ?? and 

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.