httputil

package
v0.0.0-...-cc4ef14 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddFormFileTo

func AddFormFileTo(body io.Writer, formFiles map[string]map[string]io.Reader) (contentType string, err error)

func MustParse

func MustParse(rawUrl string) *url.URL

func NewPostRequest

func NewPostRequest(url string, formFiles map[string]map[string]io.Reader) (*http.Request, error)

func NewPutRequest

func NewPutRequest(url string, formFiles map[string]map[string]io.Reader) (*http.Request, error)

Types

type Request

type Request struct {
	http.Request
}

func NewRequest

func NewRequest(method, urlStr string, body io.Reader) *Request

func (Request) Build

func (request Request) Build() *http.Request

func (*Request) WithBasicAuth

func (request *Request) WithBasicAuth(username, password string) *Request

func (*Request) WithHeader

func (request *Request) WithHeader(key, value string) *Request

Jump to

Keyboard shortcuts

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