api: github.com/moov-io/api/cmd/apitest/local Index | Files

package local

import "github.com/moov-io/api/cmd/apitest/local"


Package Files


type Transport Uses

type Transport struct {
    Underlying http.RoundTripper

    Debug bool

func (*Transport) RoundTrip Uses

func (t *Transport) RoundTrip(r *http.Request) (*http.Response, error)

RoundTrip modifies the incoming request to reshape a Moov API production URL to a local dev URL. The GoDoc for http.RoundTripper state that the request SHOULD not be modified, not MUST. If this ends up causing problems we'll have to figure out another solution.

This means:

- Dropping /v1/$app routing prefix
- Changing the local port used (each app runs on its own port now)
  - Adjusting the scheme if needed.

Package local imports 3 packages (graph) and is imported by 1 packages. Updated 2018-12-13. Refresh now. Tools for package owners.