Documentation ¶
Index ¶
- func DefaultProcessRequest(req *http.Request) *http.Request
- func DefaultProcessResponse(res *http.Response) *http.Response
- type Fixture
- func (f *Fixture) Add(originalReq *http.Request, originalRes *http.Response) error
- func (f *Fixture) Delete(req *http.Request) bool
- func (f *Fixture) Entries() []*storage.Entry
- func (f *Fixture) Match(originalReq *http.Request) *http.Response
- func (f *Fixture) WithMatcher(matcher Matcher)
- func (f *Fixture) WithRequestProcessor(processRequest RequestProcessor)
- func (f *Fixture) WithResponseProcessor(processResponse ResponseProcessor)
- type Matcher
- type RequestProcessor
- type ResponseProcessor
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DefaultProcessRequest ¶
DefaultProcessRequest is a default implementation of ProcessRequest. It removes the Date, Cookie, Authorization, and User-Agent headers.
Types ¶
type Fixture ¶
type Fixture struct {
// contains filtered or unexported fields
}
func (*Fixture) Add ¶
Add processes the http.Request and http.Response with the Fixture's RequestProcessor and ResponseProcessor and adds them to the Fixure's Storage.
func (*Fixture) WithMatcher ¶
WithMatcher sets the Matcher for the Fixture. Note: Overriding the fixture's matcher will not affect the host matching behavior that can be configured in proxy.json.
func (*Fixture) WithRequestProcessor ¶
func (f *Fixture) WithRequestProcessor(processRequest RequestProcessor)
WithRequestProcessor sets the RequestProcessor for the Fixture.
func (*Fixture) WithResponseProcessor ¶
func (f *Fixture) WithResponseProcessor(processResponse ResponseProcessor)
WithResponseProcessor sets the ResponseProcessor for the Fixture.
Click to show internal directories.
Click to hide internal directories.