package stash

import "github.com/google/martian/v3/stash"

Package stash provides a modifier that stores the request URL in a specified header.

Index

Types

type Modifier

type Modifier struct {
	// contains filtered or unexported fields
}

Modifier adds a header to the request containing the current state of the URL. The header will be named with the value stored in headerName. There will be no validation done on this header name.

func NewModifier

func NewModifier(headerName string) *Modifier

NewModifier returns a RequestModifier that write the current URL into a header.

func (*Modifier) ModifyRequest

func (m *Modifier) ModifyRequest(req *http.Request) error

ModifyRequest writes the current URL into a header.

func (*Modifier) ModifyResponse

func (m *Modifier) ModifyResponse(res *http.Response) error

ModifyResponse writes the same header written in the request into the response.

Source Files

stash_modifier.go

Version
v3.1.0
Published
Feb 24, 2020
Platform
windows/amd64
Imports
4 packages
Last checked
1 hour ago

Tools for package owners.