Skip to content
callcount

package

net/http

standard library

72 standard-library functions from net/http, ranked by how often they are called outside tests and generated code.

Docs on pkg.go.dev ↗

prod calls
182,783
non-test, non-generated
all calls
411,512
total callsites
functions
72
ranked in this snapshot
origin
std
standard-library

members

Functions in net/http

Ranked by production calls. The bar scales each function against the busiest in this package.

Function Prod calls
Request.WithContext 67,184
Header.Set 18,873
Header.Get 16,808
Request.Context 12,556
Error 8,077
ResponseWriter.Header 7,679
ResponseWriter.WriteHeader 6,054
Header.Add 5,337
Client.Do 5,209
NewRequestWithContext 4,532
ResponseWriter.Write 2,989
NewRequest 2,732
ServeMux.HandleFunc 2,663
Handler.ServeHTTP 2,333
Request.FormValue 1,978
ServeMux.Handle 914
HandleFunc 841
NewServeMux 840
Header.Del 816
StatusText 802
Redirect 758
RoundTripper.RoundTrip 742
ListenAndServe 625
Get 593
Server.Serve 592
Client.Get 565
Flusher.Flush 486
Header.Values 462
Server.Shutdown 441
Request.SetBasicAuth 410
Request.ParseForm 401
Request.PathValue 394
CanonicalHeaderKey 387
NotFound 360
Request.UserAgent 360
Handle 326
Server.ListenAndServe 291
MaxBytesReader 291
Request.Clone 279
FileServer 279
DetectContentType 271
Transport.Clone 259
Request.Cookie 254
SetCookie 231
Client.CloseIdleConnections 226
StripPrefix 218
Header.Clone 215
Server.Close 204
Hijacker.Hijack 202
ProxyURL 171
Client.Post 142
Server.ListenAndServeTLS 141
ReadResponse 136
Serve 136
ServeContent 130
Request.BasicAuth 125
Transport.CloseIdleConnections 122
FileSystem.Open 121
NewResponseController 108
ParseTime 108
Request.Write 102
Post 101
NotFoundHandler 88
ServeFile 85
Request.ParseMultipartForm 84
FS 84
Request.FormFile 83
Server.ServeTLS 79
Request.AddCookie 77
Transport.RoundTrip 75
ServeMux.ServeHTTP 73
Response.Write 73