package httputil

import "github.com/coreos/etcd/pkg/httputil"

Package httputil provides HTTP utility functions.

Index

Functions

func GracefulClose

func GracefulClose(resp *http.Response)

GracefulClose drains http.Response.Body until it hits EOF and closes it. This prevents TCP/TLS connections from closing, therefore available for reuse.

func RequestCanceler

func RequestCanceler(req *http.Request) func()

Source Files

httputil.go

Version
v3.1.5+incompatible
Published
Mar 27, 2017
Platform
linux/amd64
Imports
3 packages
Last checked
1 hour ago

Tools for package owners.