Added surf http client

- updated Makefile
- updated dependencies
This commit is contained in:
2026-01-24 15:16:51 -06:00
parent 8c85da5472
commit 519f3f4f00
5 changed files with 97 additions and 24 deletions
+11 -1
View File
@@ -15,6 +15,7 @@ import (
"sync"
"time"
"github.com/enetx/surf"
"github.com/google/go-querystring/query"
"golang.org/x/oauth2"
)
@@ -110,7 +111,16 @@ func newClient() *Client {
baseURL, _ := url.Parse(defaultBaseURL)
tokenURL, _ := url.Parse(defaultTokenURL)
client := &Client{client: &http.Client{}, BaseURL: baseURL, TokenURL: tokenURL}
surf_client := surf.NewClient().
Builder().
Impersonate().
RandomOS().
Firefox().
Session().
Build().
Unwrap()
client := &Client{client: surf_client.Std(), BaseURL: baseURL, TokenURL: tokenURL}
client.Account = &AccountService{client: client}
client.Collection = &CollectionService{client: client}