feat: Update CycleTLS to v1.0.30 and adapt API usage
This commit is contained in:
@@ -36,7 +36,7 @@ func GetInstance(URL string, sessionID string, proxy string) (*Flaresolverr, err
|
||||
}
|
||||
|
||||
func (f *Flaresolverr) requestV1(req *V1RequestBase) (*V1ResponseBase, error) {
|
||||
resp, err := request().SetBody(req).Post(f.v1Url)
|
||||
resp, err := restyClient.R().SetBody(req).Post(f.v1Url)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
@@ -170,7 +170,7 @@ func (f *Flaresolverr) SimulateGet(URL string, opts *SimulateOptions) (cycletls.
|
||||
return cycletls.Response{}, err
|
||||
}
|
||||
|
||||
return f.cycletlsC.Get(URL, &opts.Options)
|
||||
return f.cycletlsC.Get(URL, opts.Options)
|
||||
}
|
||||
|
||||
func (f *Flaresolverr) SimulatePost(URL string, opts *SimulateOptions) (cycletls.Response, error) {
|
||||
@@ -179,11 +179,11 @@ func (f *Flaresolverr) SimulatePost(URL string, opts *SimulateOptions) (cycletls
|
||||
return cycletls.Response{}, err
|
||||
}
|
||||
|
||||
return f.cycletlsC.Post(URL, &opts.Options)
|
||||
return f.cycletlsC.Post(URL, opts.Options)
|
||||
}
|
||||
|
||||
type SimulateOptions struct {
|
||||
cycletls.Options
|
||||
*cycletls.Options
|
||||
HttpCookies []*http.Cookie
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user