requests

package
v0.0.0-...-88e5d9c Latest Latest
Warning

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

Go to latest
Published: Oct 12, 2022 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RandomUserAgent

func RandomUserAgent() string

RandomUserAgent returns a random user agent

func SetProxy

func SetProxy(proxyURL string) *url.URL

SetProxy is a function that sets the proxy for the requests

func SetUserAgent

func SetUserAgent(userAgent string) string

SetUserAgent sets a random user agent to the request

Types

type Request

type Request struct {
	URL       string
	Verbose   int
	Method    string
	Data      io.Reader
	UserAgent string
	Proxy     string
}

func (*Request) NewRequest

func (r *Request) NewRequest() Response

NewRequest is a function that makes a request to a given URL and returns a Response struct

type Response

type Response struct {
	URL        string
	Header     http.Header
	Body       []byte
	StatusCode int
}

Jump to

Keyboard shortcuts

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