Documentation ¶
Index ¶
- func CalculateContentLength(reader io.Reader) (int64, error)
- func GenerateAcceptLanguageHeader(languages []string) string
- func GetTLSProfile() tls_client.ClientProfile
- func ImageToBase64(filePath string) (string, error)
- type CleanHTTP
- type Config
- type HeaderBuilder
- type RequestOption
- type UserAgentInfo
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ImageToBase64 ¶
Convert file image and return it as base64 string to use it in request.
Types ¶
type CleanHTTP ¶
type CleanHTTP struct { Config *Config TLSClient tls_client.HttpClient Cookies []*http.Cookie }
func NewCleanHTTPClient ¶
create http client and return *CleanHttp. Take *Config as params.
func (*CleanHTTP) Do ¶
func (c *CleanHTTP) Do(request RequestOption) (*http.Response, error)
Do request and return *http.Response, Take RequestOption in params.
func (*CleanHTTP) FormatCookies ¶
Take all cookies from client and return them as a header format string.
func (*CleanHTTP) GenerateBaseHeaders ¶
func (c *CleanHTTP) GenerateBaseHeaders() *HeaderBuilder
func (*CleanHTTP) GetDefaultHeader ¶
type Config ¶
type Config struct { Proxy string Timeout int BrowserFp *fp.Fingerprint TLSFp *fp.TlsFingerprint Profile tls_client.ClientProfile }
type HeaderBuilder ¶
type RequestOption ¶
type UserAgentInfo ¶
type UserAgentInfo struct { BrowserName string BrowserVersion string OSName string OSVersion string UaVersion string }
func ParseUserAgent ¶
func ParseUserAgent(userAgentString string) *UserAgentInfo
Parse user-agent informations and return *UserAgentInfo.
Click to show internal directories.
Click to hide internal directories.