func (m *Modifier) ModifyRequest(req *http.Request) error {
	m.mu.RLock()
	defer m.mu.RUnlock()
	return m.reqmod.ModifyRequest(req)
}
ModifyRequest runs reqmod.
package martianhttp
import (
	"bytes"
	"encoding/json"
	"io/ioutil"
	"net/http"
	"sync"
	"github.com/google/martian/v3"
	"github.com/google/martian/v3/log"
	"github.com/google/martian/v3/parse"
	"github.com/google/martian/v3/verify"
)
var noop = martian.Noop("martianhttp.Modifier")
type Modifier struct {
	mu     sync.RWMutex
	config []byte
	reqmod martian.RequestModifier
	resmod martian.ResponseModifier
}
func NewModifier() *Modifier {
	return &Modifier{
		reqmod: noop,
		resmod: noop,
	}
}
func (m *Modifier) SetRequestModifier(reqmod martian.RequestModifier) {
	m.mu.Lock()
	defer m.mu.Unlock()
	m.setRequestModifier(reqmod)
}
func (m *Modifier) setRequestModifier(reqmod martian.RequestModifier) {
	if reqmod == nil {
		reqmod = noop
	}
	m.reqmod = reqmod
}
func (m *Modifier) SetResponseModifier(resmod martian.ResponseModifier) {
	m.mu.Lock()
	defer m.mu.Unlock()
	m.setResponseModifier(resmod)
}
func (m *Modifier) setResponseModifier(resmod martian.ResponseModifier) {
	if resmod == nil {
		resmod = noop
	}
	m.resmod = resmod
}