HTTPie

From RHS Wiki
Revision as of 09:43, 15 April 2019 by Rafahsolis (talk | contribs) (→‎GET)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

HTTPie[edit]

Alternative to curl

Install[edit]

sudo apt install httpie

GET[edit]

http 127.0.0.1:8000
http --follow GET 127.0.0.1:8000/ 'Authorization: Bearer ey**...**Sg'

get with parameters[edit]

echo '{"query": {"match_all": {}}}' | http GET :9200/_count?pretty

POST[edit]

http --follow POST 127.0.0.1:8000/auth/api-token-auth/
http --follow POST 127.0.0.1:8000/auth/api-token-auth/ username=rafa password=1234qwer