httpmore

package
v0.0.0-...-b729584 Latest Latest
Warning

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

Go to latest
Published: Nov 9, 2020 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type RequestInit

type RequestInit struct {
	Method   string
	BaseURL  string
	URL      string
	Query    interface{}
	Body     io.Reader
	JSONBody interface{}
	Header   http.Header
	Context  context.Context
	Options  Values // Extra options for customized process - non string option use Context
}

func (*RequestInit) GetBody

func (r *RequestInit) GetBody() (io.ReadCloser, error)

func (*RequestInit) GetURL

func (r *RequestInit) GetURL() (string, error)

func (*RequestInit) HasBody

func (r *RequestInit) HasBody() bool

func (RequestInit) NewRequest

func (r RequestInit) NewRequest() (*http.Request, error)

func (RequestInit) WithOverride

func (r RequestInit) WithOverride(o RequestInit) RequestInit

type Values

type Values map[string][]string

func (Values) Add

func (v Values) Add(key, value string) Values

Add adds the value to key. It appends to any existing values associated with key.

func (Values) Clone

func (v Values) Clone() Values

func (Values) Del

func (v Values) Del(key string) Values

Del deletes the values associated with key.

func (Values) Get

func (v Values) Get(key string) string

Get gets the first value associated with the given key. If there are no values associated with the key, Get returns the empty string. To access multiple values, use the map directly.

func (Values) Set

func (v Values) Set(key, value string) Values

Set sets the key to value. It replaces any existing values.

func (Values) WithMerge

func (v Values) WithMerge(o Values) Values

func (Values) WithOverride

func (v Values) WithOverride(o Values) Values

Jump to

Keyboard shortcuts

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