martian: Index | Files

package stash

import ""

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


Package Files


type Modifier Uses

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 Uses

func NewModifier(headerName string) *Modifier

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

func (*Modifier) ModifyRequest Uses

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

ModifyRequest writes the current URL into a header.

func (*Modifier) ModifyResponse Uses

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

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

Package stash imports 4 packages (graph) and is imported by 3 packages. Updated 2019-07-18. Refresh now. Tools for package owners.