feat: get header from sendRequestRaw (#694)
* feat: get header from sendRequestRaw * Fix ci lint
This commit is contained in:
6
files.go
6
files.go
@@ -4,7 +4,6 @@ import (
|
||||
"bytes"
|
||||
"context"
|
||||
"fmt"
|
||||
"io"
|
||||
"net/http"
|
||||
"os"
|
||||
)
|
||||
@@ -159,13 +158,12 @@ func (c *Client) GetFile(ctx context.Context, fileID string) (file File, err err
|
||||
return
|
||||
}
|
||||
|
||||
func (c *Client) GetFileContent(ctx context.Context, fileID string) (content io.ReadCloser, err error) {
|
||||
func (c *Client) GetFileContent(ctx context.Context, fileID string) (content RawResponse, err error) {
|
||||
urlSuffix := fmt.Sprintf("/files/%s/content", fileID)
|
||||
req, err := c.newRequest(ctx, http.MethodGet, c.fullURL(urlSuffix))
|
||||
if err != nil {
|
||||
return
|
||||
}
|
||||
|
||||
content, err = c.sendRequestRaw(req)
|
||||
return
|
||||
return c.sendRequestRaw(req)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user