http

package
v0.2.1-0...-c07e242 Latest Latest
Warning

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

Go to latest
Published: Mar 18, 2020 License: MIT Imports: 15 Imported by: 0

Documentation

Overview

http.go

Copyright (c) 2019-2020 VMware, Inc.

SPDX-License-Identifier: https://spdx.org/licenses/MIT.html

rewrite.go

Copyright (c) 2020 VMware, Inc.

SPDX-License-Identifier: https://spdx.org/licenses/MIT.html

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Delete

func Delete(url, body string, headers ...string) (string, error)

func Get

func Get(url, body string, headers ...string) (string, error)

func GetRewrite

func GetRewrite(url, scheme string) (string, error)

Returns a rewritten url, using the urlMap table, to replace the 'hostname' part with the mapped entry withe the scheme changed to the supplied scheme. For example, the example url might have the kwite-name.namespace portion replaced with the urlMap value for that as the map key and the scheme changed form kwite to the value of the scheme parameter: kwite://kwite-name.namespace/kwite-url.

func LoadFuncs

func LoadFuncs() error

Adds all methods from this package to the template functions.

func Patch

func Patch(url, body string, headers ...string) (string, error)

func Post

func Post(url, body string, headers ...string) (string, error)

func SetRewrite

func SetRewrite(replace, with string)

Sets a rewrite (i.e., replacement) rule for the given path. If the with value is the empty string, the path replace mapping is deleted.

func WatchRewriteRules

func WatchRewriteRules(path string)

Types

This section is empty.

Jump to

Keyboard shortcuts

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