...

Package httputil

import "go.mongodb.org/mongo-driver/internal/httputil"
Overview
Index

Overview ▾

Variables

DefaultHTTPClient is the default HTTP client used across the driver.

var DefaultHTTPClient = &http.Client{
    Transport: http.DefaultTransport.(*http.Transport).Clone(),
}

func CloseIdleHTTPConnections

func CloseIdleHTTPConnections(client *http.Client)

CloseIdleHTTPConnections closes any connections which were previously connected from previous requests but are now sitting idle in a "keep-alive" state. It does not interrupt any connections currently in use.

Borrowed from the Go standard library.