httplib

package
v0.0.3 Latest Latest
Warning

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

Go to latest
Published: Jan 14, 2021 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const (
	GET    = "GET"
	POST   = "POST"
	DELETE = "DELETE"
)

HTTP methods we support

Variables

This section is empty.

Functions

This section is empty.

Types

type HTTPClient

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

func NewClient

func NewClient() *HTTPClient

func (*HTTPClient) Delete

func (c *HTTPClient) Delete(url string, params map[string]interface{}, headers map[string]string) (*http.Response, error)

func (*HTTPClient) Get

func (c *HTTPClient) Get(url string, params map[string]interface{}, headers map[string]string) (*http.Response, error)

func (*HTTPClient) Post

func (c *HTTPClient) Post(url string, bodyType string, body io.Reader, headers map[string]string) (*http.Response, error)

func (*HTTPClient) PostForm

func (c *HTTPClient) PostForm(url string, data map[string]interface{}, headers map[string]string) (*http.Response, error)

func (*HTTPClient) PostJson

func (c *HTTPClient) PostJson(url string, data interface{}, headers map[string]string) (*http.Response, error)

func (*HTTPClient) SetDebug

func (c *HTTPClient) SetDebug(debug bool) *HTTPClient

func (*HTTPClient) SetTimeout

func (c *HTTPClient) SetTimeout(connTimeout, rwTimeout time.Duration) *HTTPClient

Jump to

Keyboard shortcuts

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