Skip to content

Commit

Permalink
Merge pull request #9 from mslmio/fix/url-construction
Browse files Browse the repository at this point in the history
fix: url construction in proxy Init
  • Loading branch information
UmanShahzad authored Feb 28, 2024
2 parents c4b88bb + 08cda8e commit ba589ad
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions proxy/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,16 @@ func Init(
username string,
password string,
) (*http.Client, error) {
// Encode username and password.
encodedUsername := url.QueryEscape(username)
encodedPassword := url.QueryEscape(password)

// Prepare proxy URL.
proxyUrl, err := url.Parse(
fmt.Sprintf(
"http://%s:%s@realtime.oxylabs.io:60000",
username,
password,
encodedUsername,
encodedPassword,
),
)
if err != nil {
Expand Down

0 comments on commit ba589ad

Please # to comment.