golhttpclient

package
v0.0.0-...-1bfd785 Latest Latest
Warning

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

Go to latest
Published: Mar 2, 2023 License: MIT Imports: 11 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	SkipSSLVerify bool
)

Functions

func Http

func Http(httpMethod string, baseURL string, getParams map[string]string, httpHeaders map[string]string) (resp *http.Response, err error)

func HttpDelete

func HttpDelete(baseURL string, getParams map[string]string, httpHeaders map[string]string) (body string, err error)

func HttpGet

func HttpGet(baseURL string, getParams map[string]string, httpHeaders map[string]string) (body string, err error)

func HttpPost

func HttpPost(baseURL string, getParams map[string]string, httpHeaders map[string]string) (body string, err error)

func HttpPut

func HttpPut(baseURL string, getParams map[string]string, httpHeaders map[string]string) (body string, err error)

func LinkExists

func LinkExists(uri string) bool

func UrlRedirectTo

func UrlRedirectTo(uri string) string

Types

type HTTPRequest

type HTTPRequest struct {
	Protocol    string
	Method      string
	Url         string
	GetParams   map[string]string
	HTTPHeaders map[string]string
	Body        *bytes.Buffer
}

func (*HTTPRequest) Delete

func (httpRequest *HTTPRequest) Delete() (body string, err error)

func (*HTTPRequest) Get

func (httpRequest *HTTPRequest) Get() (body string, err error)

func (*HTTPRequest) GetBytes

func (httpRequest *HTTPRequest) GetBytes() (body []byte, err error)

func (*HTTPRequest) Head

func (httpRequest *HTTPRequest) Head() (*http.Response, error)

func (*HTTPRequest) Http

func (httpRequest *HTTPRequest) Http(httpMethod string) (resp *http.Response, err error)

func (*HTTPRequest) Options

func (httpRequest *HTTPRequest) Options() (*http.Response, error)

func (*HTTPRequest) Patch

func (httpRequest *HTTPRequest) Patch() (body string, err error)

func (*HTTPRequest) Post

func (httpRequest *HTTPRequest) Post() (body string, err error)

func (*HTTPRequest) Put

func (httpRequest *HTTPRequest) Put() (body string, err error)

func (*HTTPRequest) Response

func (httpRequest *HTTPRequest) Response() (*http.Response, error)

type HTTPSpec

type HTTPSpec struct {
	Client *HTTPRequest

	Spec string
}

func (*HTTPSpec) Parse

func (spec *HTTPSpec) Parse()

Jump to

Keyboard shortcuts

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