get-default-proxy ( request -- default-proxy )


Vocabulary
http.client.private

Inputs
requestan object


Outputs
default-proxyan object


Definition


: get-default-proxy ( request -- default-proxy )
url>> protocol>> "https" = [
"https.proxy" get [ "https_proxy" os-env ] unless*
[ "HTTPS_PROXY" os-env ] unless*
] [
"http.proxy" get [ "http_proxy" os-env ] unless*
[ "HTTP_PROXY" os-env ] unless*
] if ;