request

package
v0.0.0-...-3819a2e Latest Latest
Warning

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

Go to latest
Published: Jul 8, 2019 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Cookies = make(map[string]string)

Cookies contains all HTTP cookies to send

View Source
var Headers = make(map[string]string)

Headers contains all HTTP headers to send

Functions

func Cookie(n string, v string)

func Get

func Get(url string, client ...*http.Client) (string, error)

func GetWithClient

func GetWithClient(url string, client *http.Client) (string, error)

GetWithClient returns the HTML returned by the url using a provided HTTP client

func Header(n string, v string)

Header sets a new HTTP header

func SetDebug

func SetDebug(d bool)

SetDebug sets the debug status Setting this to true causes the panics to be thrown and logged onto the console. Setting this to false causes the errors to be saved in the Error field in the returned struct.

Types

type HTTP

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

Jump to

Keyboard shortcuts

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