request

package module
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Sep 5, 2020 License: MIT Imports: 8 Imported by: 1

README

pipeline status coverage report Go Report Card

request by oPOCCOMAXAo

This library for sending http requests over single queue and with own cookies on each client.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

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

func New

func New(parallel int64) *Client

func (*Client) Delete

func (rq *Client) Delete(url string, timeout time.Duration, headers map[string]string) Response

func (*Client) Get

func (rq *Client) Get(url string, timeout time.Duration, headers map[string]string) Response

func (*Client) GetCookie

func (rq *Client) GetCookie(host string, name string) string

func (*Client) GetHeader

func (rq *Client) GetHeader(key string) string

func (*Client) Post

func (rq *Client) Post(url string, data string, timeout time.Duration, headers map[string]string) Response

func (*Client) Put

func (rq *Client) Put(url string, data string, timeout time.Duration, headers map[string]string) Response

func (*Client) SetCookie

func (rq *Client) SetCookie(host string, name string, value string)

func (*Client) SetHeader

func (rq *Client) SetHeader(key string, value string)

type Response

type Response struct {
	Status   int
	Error    error
	Response []byte
	Headers  http.Header
}

func (*Response) Text

func (r *Response) Text() string

Jump to

Keyboard shortcuts

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