package proxyutil

import "github.com/google/martian/proxyutil"

Package proxyutil provides functionality for building proxies.

Index

Functions

func NewErrorResponse

func NewErrorResponse(code int, err error, req *http.Request) *http.Response

NewErrorResponse builds new HTTP error responses.

func NewResponse

func NewResponse(code int, body io.Reader, req *http.Request) *http.Response

NewResponse builds new HTTP responses. If body is nil, an empty byte.Buffer will be provided to be consistent with the guarantees provided by http.Transport and http.Client.

func Warning

func Warning(header http.Header, err error)

Warning adds an error to the Warning header in the format: 199 "martian" "error message" "date".

Source Files

proxyutil.go

Version
v2.0.0-beta+incompatible
Published
Aug 14, 2015
Platform
darwin/amd64
Imports
7 packages
Last checked
5 hours ago

Tools for package owners.