gorequests_proxy

package module
v0.1.4 Latest Latest
Warning

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

Go to latest
Published: Jan 6, 2023 License: LGPL-2.1 Imports: 10 Imported by: 0

README

gorequests-proxy

Go codecov

Proxy middleware for memclutter/gorequests.

Install

Installation using the go package system

go get github.com/memclutter/gorequets-proxy

Use

To use, pass to the Use() method of the RequestInstance

package main

import (
	"github.com/memclutter/gorequests"
	"github.com/memclutter/gorequests-proxy"
	"time"
)

func main() {
	proxy := &gorequests_proxy.Proxy{Proxies: []string{"http://example.com:5554", "http://user:pass@secure.example.com:33333"}}
	err := gorequests.Get("http://example.com").Use(proxy).Exec()
	// ...
}

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Proxy

type Proxy struct {
	Proxies    []string
	AllowEmpty bool
}

func (*Proxy) ClientOverride

func (m *Proxy) ClientOverride(c *http.Client) (*http.Client, error)

Jump to

Keyboard shortcuts

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