From f8db554820163b40a0eb02f8272675fd47ca799a Mon Sep 17 00:00:00 2001 From: Maksim Kamanin <79706809+tcaty@users.noreply.github.com> Date: Fri, 8 Nov 2024 13:56:24 +0300 Subject: [PATCH] regru: update authentication method (#2325) --- providers/dns/regru/internal/client.go | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/providers/dns/regru/internal/client.go b/providers/dns/regru/internal/client.go index 8d91f4a6..7ce633b0 100644 --- a/providers/dns/regru/internal/client.go +++ b/providers/dns/regru/internal/client.go @@ -76,17 +76,14 @@ func (c Client) AddTXTRecord(ctx context.Context, domain, subDomain, content str func (c Client) doRequest(ctx context.Context, request any, fragments ...string) (*APIResponse, error) { endpoint := c.baseURL.JoinPath(fragments...) - query := endpoint.Query() - query.Set("username", c.username) - query.Set("password", c.password) - endpoint.RawQuery = query.Encode() - inputData, err := json.Marshal(request) if err != nil { return nil, fmt.Errorf("failed to create input data: %w", err) } data := url.Values{} + data.Set("username", c.username) + data.Set("password", c.password) data.Set("input_data", string(inputData)) data.Set("input_format", "json")