httpc

package
v0.0.5 Latest Latest
Warning

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

Go to latest
Published: Mar 25, 2024 License: MIT Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrGetWithBody = errors.New("HTTP GET should not have body")

ErrGetWithBody indicates that GET request with body.

Functions

func Do

func Do(ctx context.Context, method, url string, data any) (*http.Response, error)

Do sends an HTTP request with the given arguments and returns an HTTP response. data is automatically marshal into a *httpRequest, typically it's defined in an API file.

func DoRequest

func DoRequest(r *http.Request) (*http.Response, error)

DoRequest sends an HTTP request and returns an HTTP response.

Types

This section is empty.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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