This commit is contained in:
Ismael Puerto 2018-04-17 20:52:06 +00:00 committed by GitHub
commit 78483777d7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 22 additions and 0 deletions

12
plugins/curl/README.md Normal file
View File

@ -0,0 +1,12 @@
# Curl aliases plugin
## Functions explained
* curlj - pretty json (require Python 2.6)
## Aliases explained
* curlh - show header only
* curls - download filename
* curlt - show response time in milliseconds
* curlrc - show http code

View File

@ -0,0 +1,10 @@
alias curlj=jsoncurl
function jsoncurl()
{
curl -s $1 |python -m json.tool
}
alias curlh="curl -siv -o /dev/null"
alias curls="curl -O"
alias curlt="curl -o /dev/null -s -w %{time_total}'\\n'"
alias curlrc="curl -s -o /dev/null -w %{http_code}'\\n'"