{"modulePath":"github.com/viant/datly","version":"v1.1.0","isLatest":true,"isStandardLibrary":false,"goos":"all","goarch":"all","docs":"# package proxy\n\nPackage proxy provides an ordinary custom handler for explicitly configured HTTP forwarding. Native input binding and runtime lifecycle rules apply.\n\n## Functions\n\n```go\nfunc New() xhandler.Contract[Input, Output]\n```\n\n## Types\n\n```go\ntype Config struct {\n\tClient       xhttp.Options `json:\"client\"`\n\tHeaders      []Header      `json:\"headers,omitempty\"`\n\tForwardQuery bool          `json:\"forwardQuery,omitempty\"`\n\tForwardBody  bool          `json:\"forwardBody,omitempty\"`\n}\n```\nConfig is deployment-owned forwarding policy. Nothing from the incoming request selects the destination or is forwarded without these options.\n\n```go\ntype Handler struct{}\n```\n\n```go\nfunc (*Handler) Exec(ctx context.Context, _ xhandler.Session, input *Input, output *Output) error\n```\n\n```go\ntype Header struct{ From, To string }\n```\n\n```go\ntype Input struct {\n\tConfig  *Config        `parameter:\"Config,kind=const,in=Proxy,required\"`\n\tHTTP    xhttp.Provider `bind:\"kind=http_client,required\"`\n\tRequest *http.Request  `parameter:\"Request,kind=http_request,required\"`\n}\n```\n\n```go\nfunc (i *Input) Init(context.Context) error\n```\nInit is the same input initialization hook available to application handlers.\n\n```go\ntype Output struct{ response.Response }\n```\n\n","path":"github.com/viant/datly/runtime/handler/proxy","name":"proxy","synopsis":"Package proxy provides an ordinary custom handler for explicitly configured HTTP forwarding.","isRedistributable":true}
