Documentation ¶
Overview ¶
Package protocol implements ftp:// scheme plugin for http.Transport
github.com/jlaffaye/ftp library is used internally as FTP client implementation.
Limitations: only anonymous FTP servers, only file retrieval operations.
Internally connections to FTP servers are cached and re-used when possible.
Example:
transport := &http.Transport{} transport.RegisterProtocol("ftp", &FTPRoundTripper{}) client := &http.Client{Transport: transport} resp, err := client.Get("ftp://ftp.ru.debian.org/debian/README")
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type FTPRoundTripper ¶
type FTPRoundTripper struct {
// contains filtered or unexported fields
}
FTPRoundTripper is an implementation of net/http.RoundTripper on top of FTP client
Click to show internal directories.
Click to hide internal directories.