httputil

package
v0.0.0-...-fab57c2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 15, 2022 License: MIT Imports: 6 Imported by: 0

Documentation

Overview

Package httputil provides a mockable wrapper for net/http/httputil.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Impl

type Impl struct{}

func (*Impl) DumpRequest

func (*Impl) DumpRequest(req *http.Request, body bool) ([]byte, error)

func (*Impl) DumpRequestOut

func (*Impl) DumpRequestOut(req *http.Request, body bool) ([]byte, error)

func (*Impl) DumpResponse

func (*Impl) DumpResponse(resp *http.Response, body bool) ([]byte, error)

func (*Impl) NewChunkedReader

func (*Impl) NewChunkedReader(r io.Reader) io.Reader

func (*Impl) NewChunkedWriter

func (*Impl) NewChunkedWriter(w io.Writer) io.WriteCloser

func (*Impl) NewClientConn

func (*Impl) NewClientConn(c net.Conn, r *bufio.Reader) *httputil.ClientConn

func (*Impl) NewProxyClientConn

func (*Impl) NewProxyClientConn(c net.Conn, r *bufio.Reader) *httputil.ClientConn

func (*Impl) NewServerConn

func (*Impl) NewServerConn(c net.Conn, r *bufio.Reader) *httputil.ServerConn

func (*Impl) NewSingleHostReverseProxy

func (*Impl) NewSingleHostReverseProxy(target *url.URL) *httputil.ReverseProxy

type Interface

type Interface interface {
	DumpRequest(req *http.Request, body bool) ([]byte, error)
	DumpRequestOut(req *http.Request, body bool) ([]byte, error)
	DumpResponse(resp *http.Response, body bool) ([]byte, error)
	NewChunkedReader(r io.Reader) io.Reader
	NewChunkedWriter(w io.Writer) io.WriteCloser
	NewClientConn(c net.Conn, r *bufio.Reader) *httputil.ClientConn
	NewProxyClientConn(c net.Conn, r *bufio.Reader) *httputil.ClientConn
	NewServerConn(c net.Conn, r *bufio.Reader) *httputil.ServerConn
	NewSingleHostReverseProxy(target *url.URL) *httputil.ReverseProxy
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL