Documentation ¶
Index ¶
- Variables
- func Header(kv ...string) *hTTPHeader
- type Request
- func (r *Request) Body(body io.Reader) *Request
- func (r *Request) BodyJSON(body interface{}) *Request
- func (r *Request) Compile() (*http.Request, error)
- func (r *Request) Get(url string) *Request
- func (r *Request) Headers(header http.Header) *Request
- func (r *Request) Method(method string) *Request
- func (r *Request) NoVersionHeader() *Request
- func (r *Request) Post(url string) *Request
- func (r *Request) PostForm(kv ...string) *Request
- func (r *Request) Put(url string) *Request
- func (r *Request) Query(kv ...string) *Request
- func (r *Request) URL(url string) *Request
Constants ¶
This section is empty.
Variables ¶
View Source
var (
// RoutingContext is a key name for version selection routing
RoutingContext = "REQUEST_ROUTING_HEADER"
)
Functions ¶
Types ¶
type Request ¶
type Request struct {
// contains filtered or unexported fields
}
Request wrap the http request
func (*Request) Compile ¶
Compile the http request version selection header spesification:
- routes-version-select propagated header for selecting version in matching url example: svc1.cluster.local|0.1.0, svc2.cluster.local|0.2.0
- route-version-select propagated header for selecting version in matching url different from routes-version-select, matching url will not propagated example: svc1.cluster.local|0.1.0
- version-select propageted header when an url is match, only contain version value example: 0.2.0
func (*Request) NoVersionHeader ¶
NoVersionHeader function to control the version selection header generation
Click to show internal directories.
Click to hide internal directories.