Fix encoding dataprovider as json body for *http filter

This commit is contained in:
gezimbll
2024-01-23 10:30:33 -05:00
committed by Dan Christian Bogos
parent 911cd1b607
commit dfb8011a1a
3 changed files with 8 additions and 16 deletions

View File

@@ -20,7 +20,6 @@ package engine
import (
"bytes"
"encoding/json"
"fmt"
"sort"
"strings"
@@ -176,9 +175,5 @@ func externalAttributeAPI(httpType string, dDP utils.DataProvider) (string, erro
if err != nil {
return "", err
}
data, err := json.Marshal(dDP)
if err != nil {
return "", fmt.Errorf("error marshaling data: %w", err)
}
return externalAPI(urlS, bytes.NewReader(data), nil)
return externalAPI(urlS, bytes.NewReader([]byte(dDP.String())))
}