httputil

package
v0.0.0-...-cd0d1ff Latest Latest
Warning

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

Go to latest
Published: May 4, 2022 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var DefaultClient = http.DefaultClient
View Source
var UserAgent = "Mozilla/5.0 (Windows NT 6.3; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/47.0.2526.27 Safari/537.36"

Functions

func GetByte

func GetByte(url string) ([]byte, error)

func GetJSON

func GetJSON(url string, v interface{}) error

func GetJs

func GetJs(url string) (string, error)

func GetRequest

func GetRequest(url string) (*http.Response, error)

func GetString

func GetString(url string) (string, error)

func StatusCode

func StatusCode(url string) (int, error)

Types

type UserAgentTransport

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

func (UserAgentTransport) RoundTrip

func (p UserAgentTransport) RoundTrip(r *http.Request) (*http.Response, error)

Jump to

Keyboard shortcuts

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