Revert "provide a more general purpose request function"

This reverts commit aa86652db8d3132fb7fe0c0253dded7deb7dce2c.

This is not actually necessary and can be accomplished with the post
function.
This commit is contained in:
Matthew Turney 2017-05-01 20:56:04 -05:00
parent 2f4111a2e2
commit 5b21cbe0de
No known key found for this signature in database
GPG Key ID: 0FC06F79FAA020CF

15
acme.sh
View File

@ -1592,17 +1592,12 @@ _post() {
return $_ret return $_ret
} }
_get() {
_request "$1" "$2" "$3" GET
}
# url getheader timeout # url getheader timeout
_request() { _get() {
_debug GET
url="$1" url="$1"
onlyheader="$2" onlyheader="$2"
t="$3" t="$3"
method="$4"
_debug method $method
_debug url "$url" _debug url "$url"
_debug "timeout" "$t" _debug "timeout" "$t"
@ -1616,9 +1611,6 @@ _request() {
if [ "$t" ]; then if [ "$t" ]; then
_CURL="$_CURL --connect-timeout $t" _CURL="$_CURL --connect-timeout $t"
fi fi
if [ "$method" ]; then
_CURL="$_CURL -X $method"
fi
_debug "_CURL" "$_CURL" _debug "_CURL" "$_CURL"
if [ "$onlyheader" ]; then if [ "$onlyheader" ]; then
$_CURL -I --user-agent "$USER_AGENT" -H "$_H1" -H "$_H2" -H "$_H3" -H "$_H4" -H "$_H5" "$url" $_CURL -I --user-agent "$USER_AGENT" -H "$_H1" -H "$_H2" -H "$_H3" -H "$_H4" -H "$_H5" "$url"
@ -1641,9 +1633,6 @@ _request() {
if [ "$t" ]; then if [ "$t" ]; then
_WGET="$_WGET --timeout=$t" _WGET="$_WGET --timeout=$t"
fi fi
if [ "$method" ]; then
_WGET="$_WGET --method=$method"
fi
_debug "_WGET" "$_WGET" _debug "_WGET" "$_WGET"
if [ "$onlyheader" ]; then if [ "$onlyheader" ]; then
$_WGET --user-agent="$USER_AGENT" --header "$_H5" --header "$_H4" --header "$_H3" --header "$_H2" --header "$_H1" -S -O /dev/null "$url" 2>&1 | sed 's/^[ ]*//g' $_WGET --user-agent="$USER_AGENT" --header "$_H5" --header "$_H4" --header "$_H3" --header "$_H2" --header "$_H1" -S -O /dev/null "$url" 2>&1 | sed 's/^[ ]*//g'