goha: github.com/FeNoMeNa/goha Index | Files

package goha

import "github.com/FeNoMeNa/goha"

Index

Package Files

digest.go goha.go

type Client Uses

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

Client is a wrapper to http.client. It is used as builder to construct the real http client

func NewClient Uses

func NewClient(username, password string) *Client

NewClient creates and initializes a new goha http client that will be able to authorize its requests via Basic / Digest authentication scheme.

func NewClientWithTransport Uses

func NewClientWithTransport(username, password string, transport http.RoundTripper) *Client

NewClient creates a new goha http client with provided http.Transport

func (*Client) Do Uses

func (c *Client) Do(req *http.Request) (resp *http.Response, err error)

func (*Client) Get Uses

func (c *Client) Get(url string) (resp *http.Response, err error)

func (*Client) Head Uses

func (c *Client) Head(url string) (resp *http.Response, err error)

func (*Client) Jar Uses

func (c *Client) Jar(j *cookiejar.Jar) *Client

Jar sets Client.Jar to passed cookiejar.Jar

func (*Client) Post Uses

func (c *Client) Post(url string, bodyType string, body io.Reader) (resp *http.Response, err error)

func (*Client) PostForm Uses

func (c *Client) PostForm(url string, data url.Values) (resp *http.Response, err error)

func (*Client) Timeout Uses

func (c *Client) Timeout(t time.Duration) *Client

Timeout initializes the default timeout of the http client. A Timeout of zero means no timeout.

Package goha imports 10 packages (graph) and is imported by 1 packages. Updated 2018-09-29. Refresh now. Tools for package owners.