handlers

package module
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: May 14, 2020 License: MPL-2.0 Imports: 6 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewProxyHandler

func NewProxyHandler(config map[string]string) http.HandlerFunc

NewProxyHandler creates a HandlerFunc func object which proxy an HTTP call by a key-value map as the configuration. The configuration should contain 2 fields: target, pathBase. The target field indicates the full URL as the proxy target. The request parameters after ? will be added to the parameters of the target URL. The pathBase field indicates the prefix of the full path of the URL of the original request received, which includes the prefix by router configuration and path by handler configuration.

Types

This section is empty.

Jump to

Keyboard shortcuts

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