proxy

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Sep 13, 2023 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetHandler

func GetHandler(context echo.Context) error

@Summary Do a GET request. @Tags Proxy Methods @Description Query httpod as reverse proxy to uri. @Accept json @Produce json @Param uri header string false "Full URI to use for the backend request. Mandatory. e.g. https://example.org/path " @Param method header string false "Method to use for the backend request. Optional, defaults to 'GET'." TODO @Param body header string false "Body to use for a POST request. Optional." TODO @Param additionalHeaders header string false "JSON of headers to add to the backend request. Optional." @Success 200 @Failure 400 @Failure 500 @Router /proxy [get]

Types

type BackendRequest

type BackendRequest struct {
	Method     string
	URI        *url.URL
	Request    *http.Request
	HttpClient *http.Client
}
var (
	Br BackendRequest
)

type BackendResponse

type BackendResponse struct {
	StatusCode int
	URI        string
	Headers    http.Header
	Body       string
}

Jump to

Keyboard shortcuts

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