httputil

package
v0.0.0-...-6117bb9 Latest Latest
Warning

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

Go to latest
Published: May 1, 2024 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ReadRawResponse

func ReadRawResponse[T any](response *http.Response) (*T, error)

Reads the raw HTTP response and attempt to convert it into the specified type Typically used in conjunction with runtime.WithCaptureResponse(...) to get access to the underlying HTTP response of the SDK API call.

func TlsEnabledTransport

func TlsEnabledTransport(derBytes string) (*http.Transport, error)

TlsEnabledTransport returns a http.Transport that has TLS configured to use the provided Base64 DER-encoded certificate. The returned http.Transport inherits defaults from http.DefaultTransport.

Types

type HttpClient

type HttpClient interface {
	Do(req *http.Request) (*http.Response, error)
}

type UserAgent

type UserAgent string

Jump to

Keyboard shortcuts

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