httpclient

package
v1.5.1 Latest Latest
Warning

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

Go to latest
Published: Mar 8, 2023 License: MIT Imports: 10 Imported by: 1 module, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Delete

func Delete(ctx context.Context, url string, opt *HTTPOption) (int, []byte, error)

Deleteリクエスト(URL)

func DeleteForm

func DeleteForm(ctx context.Context, url string, param map[string]any, opt *HTTPOption) (int, []byte, error)

Deleteリクエスト(URL, param)

func DeleteJSON

func DeleteJSON(ctx context.Context, url string, param any, res any, opt *HTTPOption) (int, error)

Deleteリクエスト(URL, JSON)

func DeleteQueryString

func DeleteQueryString(ctx context.Context, url string, qs string, opt *HTTPOption) (int, []byte, error)

Deleteリクエスト(URL, QueryString)

func Get

func Get(ctx context.Context, url string, opt *HTTPOption) (int, []byte, error)

Getリクエスト(URL)

func GetForm

func GetForm(ctx context.Context, url string, param map[string]any, opt *HTTPOption) (int, []byte, error)

Getリクエスト(URL, param)

func GetQueryString

func GetQueryString(ctx context.Context, url string, qs string, opt *HTTPOption) (int, []byte, error)

Getリクエスト(URL, QueryString)

func PatchBody added in v1.0.8

func PatchBody(ctx context.Context, url string, body []byte, opt *HTTPOption) (int, []byte, error)

Patchリクエスト(URL, Body)

func PatchJSON added in v1.0.8

func PatchJSON(ctx context.Context, url string, param any, res any, opt *HTTPOption) (int, error)

Patchリクエスト(URL, JSON)

func PostBody

func PostBody(ctx context.Context, url string, body []byte, opt *HTTPOption) (int, []byte, error)

Postリクエスト(URL, Body)

func PostForm

func PostForm(ctx context.Context, url string, param map[string]any, opt *HTTPOption) (int, []byte, error)

Postリクエスト(URL, param)

func PostJSON

func PostJSON(ctx context.Context, url string, param any, res any, opt *HTTPOption) (int, error)

Postリクエスト(URL, JSON)

func PutBody

func PutBody(ctx context.Context, url string, body []byte, opt *HTTPOption) (int, []byte, error)

Putリクエスト(URL, Body)

func PutJSON

func PutJSON(ctx context.Context, url string, param any, res any, opt *HTTPOption) (int, error)

Putリクエスト(URL, JSON)

Types

type HTTPOption

type HTTPOption struct {
	Headers map[string]string
	Timeout time.Duration
}

Jump to

Keyboard shortcuts

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