request

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Apr 13, 2023 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Delete

func Delete(url string, headers H) ([]byte, error)

func Get

func Get(url string, headers H) ([]byte, error)

func JsonDelete

func JsonDelete(url string, headers H) ([]byte, error)

func JsonPatch

func JsonPatch(url string, query any, headers H) ([]byte, error)

func JsonPost

func JsonPost(url string, query any, headers H) ([]byte, error)

func JsonPut

func JsonPut(url string, query any, headers H) ([]byte, error)

func Patch

func Patch(url, query string, headers H) ([]byte, error)

func Post

func Post(url, query string, headers H) ([]byte, error)

func Put

func Put(url, query string, headers H) ([]byte, error)

func TextGet

func TextGet(url string, headers H) (string, error)

func TextPost

func TextPost(url string, query string, headers H) (string, error)

func TimingGet

func TimingGet(url string, headers H, timeout int64) string

Types

type Client

type Client struct {
	Method  string
	Url     string
	Data    string
	Headers map[string]string
	Timeout time.Duration
}

func (*Client) JsonRequest

func (c *Client) JsonRequest() ([]byte, error)

func (*Client) Request

func (c *Client) Request() ([]byte, error)

func (*Client) TextRequest

func (c *Client) TextRequest() (string, error)

type H

type H map[string]string

Jump to

Keyboard shortcuts

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