util::http::available (public)
util::http::available [ -preference preference ] [ args... ]
Defined in packages/acs-tcl/tcl/http-client-procs.tcl
Return the preferred HTTP API among those available based on preference and OpenACS installation capabilities.
- Switches:
- -preference (optional, defaults to
"native curl"
)- decides which available implementation prefer in respective order. Choice is between 'native', based on ns_http api, available for NaviServer only and giving the best performances and 'curl', which wraps the command line utility (available on every system with curl installed).
- Partial Call Graph (max 5 caller/called nodes):
- Testcases:
- No testcase defined.
Source code: if {[llength $args] > 0} { ns_log warning "util::http::available: possible deprecated arguments specified ($args)" } set preferred [lindex $preference 0] if {$preferred eq "native" && [acs::icanuse "ns_http results dict"]} { return "native" } elseif {[util::which curl] ne ""} { return "curl" } else { return "" }XQL Not present: Generic, PostgreSQL, Oracle