http

package
v1.5.0 Latest Latest
Warning

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

Go to latest
Published: Jun 11, 2022 License: MIT Imports: 5 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ClientProvider

type ClientProvider struct {
	// contains filtered or unexported fields
}

ClientProvider ...

func NewClientProvider

func NewClientProvider(timeout time.Duration) *ClientProvider

NewClientProvider initiate a new client object

func (*ClientProvider) Request

func (h *ClientProvider) Request(url string, method string, header map[string]string, body []byte, params map[string]string) (statusCode int, resBody []byte, err error)

Request http

func (*ClientProvider) RequestCSV

func (h *ClientProvider) RequestCSV(url string) ([][]string, error)

RequestCSV requests http API that returns csv result

type Response

type Response struct {
	StatusCode int
	Body       []byte
}

Response returned from http request

Jump to

Keyboard shortcuts

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