Changes
Jump to navigation
Jump to search
← Older edit
HTTPie
(edit)
Revision as of 09:43, 15 April 2019
137 bytes added
,
09:43, 15 April 2019
m
→GET
Line 1:
Line 1:
−
= [https://httpie.org/doc HTTPie] =
+
=[https://httpie.org/doc HTTPie]=
Alternative to curl
Alternative to curl
−
== Install ==
+
==Install==
sudo apt install httpie
sudo apt install httpie
−
== GET ==
+
==GET==
http 127.0.0.1:8000
http 127.0.0.1:8000
http --follow GET 127.0.0.1:8000/ 'Authorization: Bearer ey**...**Sg'
http --follow GET 127.0.0.1:8000/ 'Authorization: Bearer ey**...**Sg'
−
== POST ==
+
=== get with parameters ===
+
<syntaxhighlight lang="bash">
+
echo '{"query": {"match_all": {}}}' | http GET :9200/_count?pretty
+
</syntaxhighlight>
+
+
==POST==
http --follow POST 127.0.0.1:8000/auth/api-token-auth/
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
http --follow POST 127.0.0.1:8000/auth/api-token-auth/ username=rafa password=1234qwer
Rafahsolis
Bureaucrats
,
Administrators
2,306
edits
Navigation menu
Personal tools
Not logged in
Talk
Contributions
Create account
Log in
Namespaces
Page
Discussion
Variants
Views
Read
Edit
View history
More
Search
Navigation
Main page
Recent changes
Random page
Help about MediaWiki
Tools
Special pages
Printable version