fasthttpclient_wrapper

package module
v0.0.0-...-c6d7c7b Latest Latest
Warning

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

Go to latest
Published: Mar 19, 2018 License: MIT Imports: 3 Imported by: 0

README

fasthttpclient-wrapper

A wrapper to ease the use of the fasthttp as HTTP client

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
	Headers map[string]string
	// contains filtered or unexported fields
}

func NewClient

func NewClient() *Client

func (*Client) AddHeader

func (client *Client) AddHeader(name, value string) *Client

func (*Client) BaseURL

func (client *Client) BaseURL() string

func (*Client) DelHeader

func (client *Client) DelHeader(name string) *Client

func (*Client) DeleteJSON

func (client *Client) DeleteJSON(path string, data interface{}, out interface{}, headers map[string]string) (int, error)

func (*Client) GetJSON

func (client *Client) GetJSON(path string, queryParams *url.Values, out interface{}, headers map[string]string) (int, error)

func (*Client) Header

func (client *Client) Header(name string) (string, bool)

func (*Client) PostJSON

func (client *Client) PostJSON(path string, data interface{}, out interface{}, headers map[string]string) (int, error)

func (*Client) PutJSON

func (client *Client) PutJSON(path string, data interface{}, out interface{}, headers map[string]string) (int, error)

func (*Client) RequestJson

func (client *Client) RequestJson(method, path string, queryParams *url.Values, body interface{}, out interface{}, headers map[string]string) (int, error)

func (*Client) SetBaseURL

func (client *Client) SetBaseURL(baseURL string) *Client

func (*Client) SetUserAgent

func (client *Client) SetUserAgent(userAgent string) *Client

func (*Client) UserAgent

func (client *Client) UserAgent() string

Jump to

Keyboard shortcuts

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