httputils

package
v0.477.0 Latest Latest
Warning

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

Go to latest
Published: Dec 15, 2025 License: Apache-2.0 Imports: 16 Imported by: 0

README

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DownloadAsFile added in v0.343.0

func DownloadAsFile(ctx context.Context, options *httputilsparameteroptions.DownloadAsFileOptions) (downloadedFile filesinterfaces.File, err error)

func GetNativeClient

func GetNativeClient() (client httputilsinterfaces.Client)

Get the HTTP client written using native go http implementation.

This is the default client to use when sending request from your running machine.

func GetProgressEveryNBytes added in v0.343.0

func GetProgressEveryNBytes(ctx context.Context) int

func SendRequest added in v0.314.0

func SendRequestAndGetBodyAsString

func SendRequestAndGetBodyAsString(ctx context.Context, requestOptions *httputilsparameteroptions.RequestOptions) (response string, err error)

func WithDownloadProgressEveryNBytes added in v0.343.0

func WithDownloadProgressEveryNBytes(ctx context.Context, nBytes int) context.Context

func WithDownloadProgressEveryNMBytes added in v0.343.0

func WithDownloadProgressEveryNMBytes(ctx context.Context, nMBytes int) context.Context

func WithDownloadProgressEveryNkBytes added in v0.343.0

func WithDownloadProgressEveryNkBytes(ctx context.Context, nkBytes int) context.Context

Types

type NativeClient

type NativeClient struct {
	// contains filtered or unexported fields
}

HTTP client written using native go http implementation.

func NewNativeClient

func NewNativeClient() (n *NativeClient)

func (*NativeClient) DownloadAsFile

func (n *NativeClient) DownloadAsFile(ctx context.Context, downloadOptions *httputilsparameteroptions.DownloadAsFileOptions) (downloadedFile filesinterfaces.File, err error)

func (*NativeClient) DownloadAsTemporaryFile

func (n *NativeClient) DownloadAsTemporaryFile(ctx context.Context, downloadOptions *httputilsparameteroptions.DownloadAsFileOptions) (downloadedFile filesinterfaces.File, err error)

func (*NativeClient) SendRequest

func (c *NativeClient) SendRequest(ctx context.Context, requestOptions *httputilsparameteroptions.RequestOptions) (response httputilsinterfaces.Response, err error)

func (*NativeClient) SendRequestAndGetBodyAsString

func (c *NativeClient) SendRequestAndGetBodyAsString(ctx context.Context, requestOptions *httputilsparameteroptions.RequestOptions) (responseBody string, err error)

func (*NativeClient) SendRequestAndRunYqQueryAgainstBody

func (c *NativeClient) SendRequestAndRunYqQueryAgainstBody(ctx context.Context, requestOptions *httputilsparameteroptions.RequestOptions, query string) (result string, err error)

func (*NativeClient) SetPort added in v0.476.0

func (n *NativeClient) SetPort(port int) error

Jump to

Keyboard shortcuts

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