client

package
v1.72.1 Latest Latest
Warning

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

Go to latest
Published: Feb 24, 2025 License: Apache-2.0, BSD-3-Clause, Apache-2.0 Imports: 5 Imported by: 0

Documentation

Overview

Package client provides context.Context-aware alternatives to the short-hand request functions http.Get, http.Head, http.Post, and http.PostForm. Using these functions allows for better control over the trace context propagation.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Get

func Get(ctx context.Context, url string) (resp *http.Response, err error)

Get is a context.Context aware version of http.Get.

func Head(ctx context.Context, url string) (resp *http.Response, err error)

Head is a context.Context aware version of http.Head.

func Post

func Post(ctx context.Context, url string, contentType string, body io.Reader) (resp *http.Response, err error)

Post is a context.Context aware version of http.Post.

func PostForm

func PostForm(ctx context.Context, url string, data url.Values) (resp *http.Response, err error)

PostForm is a context.Context aware version of http.PostForm.

Types

This section is empty.

Jump to

Keyboard shortcuts

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