stash

package
Version: v2.1.0+incompatible Latest Latest
Warning

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

Go to latest
Published: Sep 28, 2018 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Overview

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

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
t or T : Toggle theme light dark auto
y or Y : Canonical URL