client

package
v0.0.0-...-32f485c Latest Latest
Warning

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

Go to latest
Published: Mar 19, 2024 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DoCorsPreflightRequest

func DoCorsPreflightRequest(url, origin, requestMethod, requestHeader, referer string) (http.Header, error)

func DoCorsSimpleRequest

func DoCorsSimpleRequest(url, httpMethod, origin, msg string) (http.Header, error)

DoCorsSimpleRequest sends a simple request with Origin field in request header

func DoGet

func DoGet(url string) ([]byte, error)

DoGet performs a Get request to a specified url

func DoHttpsGet

func DoHttpsGet(url string, httpVersion int, rootCertPath, certPath, keyPath string) (http.Header, []byte, error)

DoHttpsGet performs a HTTPS Get request to a specified url

func DoJWT

func DoJWT(host, method, path, apiKey, serviceAccount, token string) ([]byte, error)

DoJWT performs an authenticated request using the credentials in the service account file.

func DoPost

func DoPost(url, message string) ([]byte, error)

DoPost performs a POST request to a specified url

func DoPostWithHeaders

func DoPostWithHeaders(url, message string, headers map[string]string) ([]byte, error)

DoPostWithHeaders performs a POST request to a specified url with given headers and message

func DoWS

func DoWS(address, path, query string, header map[string][]string, reqMsg string, messageCount int) ([]byte, error)

func DoWithHeaders

func DoWithHeaders(url, method, message string, headers map[string]string) ([]byte, error)

DoWithHeaders performs a GET/POST/PUT/DELETE/PATCH request to a specified url with given headers and message(if provided)

func DoWithHeadersAndTimeout

func DoWithHeadersAndTimeout(url, method, message string, headers map[string]string, timeout time.Duration) ([]byte, error)

DoWithHeadersAndTimeout performs a GET/POST/PUT/DELETE/PATCH request to a specified url with given headers and message(if provided) and timeout

Types

This section is empty.

Jump to

Keyboard shortcuts

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