json mashal instead of struct in body

This commit is contained in:
2025-10-14 11:37:19 +03:00
parent 8006fd0935
commit b33620f629

View File

@@ -8,10 +8,16 @@ import (
)
func (c *Client) executeRequest(ctx context.Context, request FiscalRequest, response interface{}) error {
reqJson, err := json.Marshal(request)
if err != nil {
return fmt.Errorf("failed to marshal request: %w", err)
}
fmt.Println(string(reqJson))
resp, err := c.resty.R().
SetContext(ctx).
SetHeader("Authorization", c.token).
SetBody(request).
SetBody(reqJson).
Post(c.apiBaseURL + "/fiscal/execute")
if err != nil {