httpClient

package
v0.0.0-...-d92abce Latest Latest
Warning

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

Go to latest
Published: Oct 11, 2018 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type HttpClient

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

func (HttpClient) Delete

func (this HttpClient) Delete() (retVal HttpExecutor)

func (HttpClient) Execute

func (this HttpClient) Execute(url string, headers map[string]string, body []byte) (response []byte, err error)

func (HttpClient) ExecuteWithReader

func (this HttpClient) ExecuteWithReader(url string, headers map[string]string, body io.Reader) (response []byte, err error)

func (HttpClient) Get

func (this HttpClient) Get() (retVal HttpExecutor)

func (HttpClient) Post

func (this HttpClient) Post() (retVal HttpExecutor)

func (HttpClient) Put

func (this HttpClient) Put() (retVal HttpExecutor)

func (HttpClient) SetContentType

func (this HttpClient) SetContentType(newContentType string) HttpClient

func (HttpClient) WithBasicAuth

func (this HttpClient) WithBasicAuth(user string, password string) HttpExecutor

type HttpExecutor

type HttpExecutor interface {
	WithBasicAuth(user string, password string) HttpExecutor
	Get() (retVal HttpExecutor)
	Put() (retVal HttpExecutor)
	Post() (retVal HttpExecutor)
	Delete() (retVal HttpExecutor)
	SetContentType(newContentType string) HttpClient
	ExecuteWithReader(url string, headers map[string]string, at io.Reader) (response []byte, err error)
	Execute(url string, headers map[string]string, body []byte) (response []byte, err error)
}

func NewHttpExecutor

func NewHttpExecutor() HttpExecutor

Jump to

Keyboard shortcuts

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