mirror of
https://github.com/cgrates/cgrates.git
synced 2026-02-11 18:16:24 +05:00
Fix encoding dataprovider as json body for *http filter
This commit is contained in:
committed by
Dan Christian Bogos
parent
911cd1b607
commit
dfb8011a1a
@@ -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())))
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user