Skip to content

Commit

Permalink
fix(datastore): could not read body
Browse files Browse the repository at this point in the history
  • Loading branch information
Alan-pad committed Apr 26, 2024
1 parent 80ecb8e commit 4066413
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions internal/datastore/client/client.go
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
package client

import (
"bytes"
"crypto/tls"
"encoding/json"
"fmt"
"io"
"net/http"
"net/url"
"os"
"strings"

"github.com/padok-team/burrito/internal/datastore/api"
storageerrors "github.com/padok-team/burrito/internal/datastore/storage/error"
Expand Down Expand Up @@ -119,7 +119,7 @@ func (c *DefaultClient) PutPlan(namespace string, layer string, run string, atte
"format": {format},
},
http.MethodPut,
strings.NewReader(string(body)),
bytes.NewBuffer(body),
)
req.Header.Set("Content-Type", "application/json")
if err != nil {
Expand Down Expand Up @@ -200,7 +200,7 @@ func (c *DefaultClient) PutLogs(namespace string, layer string, run string, atte
"/api/logs",
queryParams,
http.MethodPut,
strings.NewReader(string(body)),
bytes.NewBuffer(body),
)
req.Header.Set("Content-Type", "application/json")
if err != nil {
Expand Down

0 comments on commit 4066413

Please sign in to comment.