httpclient

package
v1.67.4 Latest Latest
Warning

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

Go to latest
Published: Jul 10, 2024 License: MIT Imports: 15 Imported by: 2

Documentation

Index

Constants

View Source
const (
	PATH                = "path"
	URL                 = "url"
	URLENCODEBODY       = "url_encode_body"
	BASEURL             = "base_url"
	METHOD              = "method"
	BODY                = "body"
	HEADER              = "header"
	QUERYPARAMS         = "query_params"
	USESSE              = "use_sse"
	SSEMETHODPOST       = "sse_method_post"
	SCHEME              = "scheme"
	HOST                = "host"
	UNNULLVARIABLES     = "unnull_variables"
	UNDEFINED_VARIABLES = "undefined"
)
View Source
const (
	ContentEncodingHeader = "Content-Encoding"
	AcceptEncodingHeader  = "Accept-Encoding"
)

Variables

View Source
var (
	DefaultNetHttpClient = &http.Client{
		Timeout: time.Second * 10,
		Transport: &http.Transport{
			MaxIdleConnsPerHost: 1024,
			TLSHandshakeTimeout: 0 * time.Second,
		},
	}
)

Functions

func Do

func Do(client *http.Client, ctx context.Context, requestInput []byte, out io.Writer) (err error)

func GetSubscriptionInput

func GetSubscriptionInput(input []byte) (url, header, body []byte)

func IsInputFlagSet added in v1.60.3

func IsInputFlagSet(input []byte, flagName string) bool

func SetInputBody

func SetInputBody(input, body []byte) []byte

func SetInputBodyWithPath

func SetInputBodyWithPath(input, body []byte, path string) []byte

func SetInputFlag added in v1.55.0

func SetInputFlag(input []byte, flagName string) []byte

func SetInputHeader

func SetInputHeader(input, headers []byte) []byte

func SetInputHost

func SetInputHost(input, host []byte) []byte

func SetInputMethod

func SetInputMethod(input, method []byte) []byte

func SetInputPath

func SetInputPath(input, path []byte) []byte

func SetInputQueryParams

func SetInputQueryParams(input, queryParams []byte) []byte

func SetInputScheme

func SetInputScheme(input, scheme []byte) []byte

func SetInputURL

func SetInputURL(input, url []byte) []byte

func SetInputURLEncodeBody

func SetInputURLEncodeBody(input []byte, urlEncodeBody bool) []byte

func SetUndefinedVariables added in v1.63.0

func SetUndefinedVariables(data []byte, undefinedVariables []string) []byte

func UndefinedVariables added in v1.63.0

func UndefinedVariables(data []byte) []string

Types

This section is empty.

Jump to

Keyboard shortcuts

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