Function ttfb::ttfb [−][src]
pub fn ttfb(
input: String,
allow_insecure_certificates: bool
) -> Result<TtfbOutcome, TtfbError>
Expand description
Takes a URL and connects to it via http/1.1. Measures time for DNS lookup, TCP connection start, TLS handshake, and TTFB (Time to First Byte) of HTML content.
Parameters
input
: Url. Can be one ofphip1611.de
(defaults tohttp://
)http://phip1611.de
https://phip1611.de
https://phip1611.de?foo=bar
https://sub.domain.phip1611.de?foo=bar
http://12.34.56.78/foobar
12.34.56.78/foobar
(defaults tohttp://
)12.34.56.78
(defaults tohttp://
)
allow_insecure_certificates
: if illegal certificates (untrusted, expired) should be accepted when https is used. Similar to-k/--insecure
incurl
.
Return value
TtfbOutcome
or TtfbError
.