ci: regenerated with OpenAPI Doc , Speakeasy CLI 1.438.1

This commit is contained in:
speakeasybot
2024-11-12 00:10:16 +00:00
parent aeebf438e1
commit da5491e935
35 changed files with 633 additions and 1748 deletions

View File

@@ -3,10 +3,12 @@
package utils
import (
"bytes"
"context"
"fmt"
"io"
"math/big"
"net/http"
"reflect"
"regexp"
"strconv"
@@ -228,3 +230,15 @@ func contains(arr []string, str string) bool {
}
return false
}
func ConsumeRawBody(res *http.Response) ([]byte, error) {
rawBody, err := io.ReadAll(res.Body)
if err != nil {
return nil, fmt.Errorf("error reading response body: %w", err)
}
res.Body.Close()
res.Body = io.NopCloser(bytes.NewBuffer(rawBody))
return rawBody, nil
}