Documentation ¶
Index ¶
- Variables
- type Proxy
- func (sprox Proxy) Create() (*http.Client, error)
- func (sprox Proxy) Do(req *http.Request) (resp *http.Response, err error)
- func (sprox Proxy) Get(url string) (*http.Response, error)
- func (sprox Proxy) Head(url string) (resp *http.Response, err error)
- func (sprox Proxy) LimitGet(url string, limit int64) ([]byte, error)
- func (sprox Proxy) LimitPost(url string, bodyType string, body io.Reader, limit int64) ([]byte, error)
- func (sprox Proxy) LimitPostBytes(url string, bodyType string, body []byte, limit int64) ([]byte, error)
- func (sprox Proxy) Post(url string, bodyType string, body io.Reader) (*http.Response, error)
- func (sprox Proxy) PostBytes(url string, bodyType string, body []byte) (*http.Response, error)
- func (sprox Proxy) PostForm(url string, data urlPackage.Values) (resp *http.Response, err error)
Constants ¶
This section is empty.
Variables ¶
View Source
var AcceptNoSocks = false
AcceptNoSocks allows workaround if no socks proxy is given
View Source
var ErrNoProxy = errors.New("socks: No proxy configured")
ErrNoProxy is returned if no proxy has been configured and AcceptNoSocks == false
View Source
var Timeout = int64(90)
Timeout for socks connections. In seconds
Functions ¶
This section is empty.
Types ¶
type Proxy ¶
type Proxy string
Proxy is a socks proxy
func (Proxy) LimitGet ¶
LimitGet fetches at most limit bytes from url. Throws error if more data is available
func (Proxy) LimitPost ¶
func (sprox Proxy) LimitPost(url string, bodyType string, body io.Reader, limit int64) ([]byte, error)
LimitPost posts body and reads a maximum of limit. Throws error if more data is available
func (Proxy) LimitPostBytes ¶
func (sprox Proxy) LimitPostBytes(url string, bodyType string, body []byte, limit int64) ([]byte, error)
LimitPostBytes posts []byte and limits the return to limit. Throws error if more data is available
Click to show internal directories.
Click to hide internal directories.