react

package
v1.0.3 Latest Latest
Warning

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

Go to latest
Published: Dec 5, 2019 License: Apache-2.0 Imports: 13 Imported by: 1

Documentation

Overview

Package react allows for the replacement of message body on responses.

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 substitutes the body on an HTTP response.

func NewModifier

func NewModifier(b []byte) *Modifier

NewModifier constructs and returns a body.Modifier.

func (*Modifier) ModifyRequest

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

ModifyRequest sets the Content-Type header and overrides the request body.

func (*Modifier) ModifyResponse

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

ModifyResponse sets the Content-Type header and overrides the response body.

func (*Modifier) SetBoundary

func (m *Modifier) SetBoundary(boundary string)

SetBoundary set the boundary string used for multipart range responses.

Jump to

Keyboard shortcuts

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