httpclient

package
v1.0.7 Latest Latest
Warning

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

Go to latest
Published: Dec 20, 2021 License: MIT Imports: 10 Imported by: 0

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 ... Deleteリクエスト(URL)

func DeleteForm

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

DeleteForm ... Deleteリクエスト(URL, param)

func DeleteJSON

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

DeleteJSON ... Deleteリクエスト(URL, JSON)

func DeleteQueryString

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

DeleteQueryString ... Deleteリクエスト(URL, QueryString)

func Get

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

Get ... Getリクエスト(URL)

func GetForm

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

GetForm ... Getリクエスト(URL, param)

func GetQueryString

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

GetQueryString ... Getリクエスト(URL, QueryString)

func PostBody

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

PostBody ... Postリクエスト(URL, Body)

func PostForm

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

PostForm ... Postリクエスト(URL, param)

func PostJSON

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

PostJSON ... Postリクエスト(URL, JSON)

func PutBody

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

PutBody ... Putリクエスト(URL, Body)

func PutJSON

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

PutJSON ... Putリクエスト(URL, JSON)

Types

type HTTPOption

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

HTTPOption ... HTTP通信モジュールの追加設定

Jump to

Keyboard shortcuts

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