Httpie 치트 시트

5100 단어 cheatsheethttpie

참고문헌


  • https://github.com/jakubroztocil/httpie
  • Httpie Cheat Sheet

  • 옵션



    인쇄 옵션




    -v, --verbose            # same as --print=HhBb --all
    -h, --headers            # same as --print=h
    -b, --body               # same as --print=b
        --all                # print intermediate requests
        --print=HhBb         # H: request headers
                             # B: request body
                             # h: response headers
                             # b: response body
        --pretty=none        # all | colors | format
        --json | -j          # Response is serialized as a JSON object.
    


    입증




        --session NAME
    -a, --auth USER:PASS
        --auth-type basic
        --auth-type digest
    


    세션




        --session NAME       # store auth and cookies
        --session-read-only NAME
    


    다운로드 중




    -d, --download           # like wget
    -c, --continue
    -o, --output FILE
    


    기타




    -F, --follow             # follow redirects
        --max-redirects N    # maximum for --follow
        --timeout SECONDS
        --verify no          # skip SSL verification
        --proxy http:http://foo.bar:3128
    


    원시 JSON




    $ echo '{"hello": "world"}' | http POST example.com/post
    


    양식




    $ http --form POST example.com \
        name="John Smith" \
        cv=@document.txt
    


    매개변수




    $ http POST http://example.com/posts/3 \
        Origin:example.com \  # :   HTTP headers
        name="John Doe" \     # =   string
        q=="search" \         # ==  URL parameters (?q=search)
        age:=29 \             # :=  for non-strings
        list:='[1,3,4]' \     # :=  json
        [email protected] \       # @   attach file
        token=@token.txt \    # =@  read from file (text)
        user:=@user.json      # :=@ read from file (json)
    


    소개



    HTTPie 명령줄 HTTP 클라이언트입니다.
  • HTTPie website (httpie.org)
  • HTTPie documentation (httpie.org)
  • Try it online (httpie.org)
  • 좋은 웹페이지 즐겨찾기