Skip to content

Commit 21a30a4

Browse files
fix(client): correctly specify Accept header with */* instead of empty
1 parent 87ad44d commit 21a30a4

File tree

4 files changed

+4
-4
lines changed

4 files changed

+4
-4
lines changed

accountorigin.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ func (r *AccountOriginService) List(ctx context.Context, opts ...option.RequestO
7474
// any URL‑endpoints, the API will return an error.
7575
func (r *AccountOriginService) Delete(ctx context.Context, id string, opts ...option.RequestOption) (err error) {
7676
opts = slices.Concat(r.Options, opts)
77-
opts = append([]option.RequestOption{option.WithHeader("Accept", "")}, opts...)
77+
opts = append([]option.RequestOption{option.WithHeader("Accept", "*/*")}, opts...)
7878
if id == "" {
7979
err = errors.New("missing required id parameter")
8080
return

accounturlendpoint.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ func (r *AccountURLEndpointService) List(ctx context.Context, opts ...option.Req
7575
// URL‑endpoint created by ImageKit during account creation.
7676
func (r *AccountURLEndpointService) Delete(ctx context.Context, id string, opts ...option.RequestOption) (err error) {
7777
opts = slices.Concat(r.Options, opts)
78-
opts = append([]option.RequestOption{option.WithHeader("Accept", "")}, opts...)
78+
opts = append([]option.RequestOption{option.WithHeader("Accept", "*/*")}, opts...)
7979
if id == "" {
8080
err = errors.New("missing required id parameter")
8181
return

dummy.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ func NewDummyService(opts ...option.RequestOption) (r DummyService) {
3838
// and is not intended for public consumption.
3939
func (r *DummyService) New(ctx context.Context, body DummyNewParams, opts ...option.RequestOption) (err error) {
4040
opts = slices.Concat(r.Options, opts)
41-
opts = append([]option.RequestOption{option.WithHeader("Accept", "")}, opts...)
41+
opts = append([]option.RequestOption{option.WithHeader("Accept", "*/*")}, opts...)
4242
path := "v1/dummy/test"
4343
err = requestconfig.ExecuteNewRequest(ctx, http.MethodPost, path, body, nil, opts...)
4444
return

file.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ func (r *FileService) Update(ctx context.Context, fileID string, body FileUpdate
7272
// the cache using purge cache API.
7373
func (r *FileService) Delete(ctx context.Context, fileID string, opts ...option.RequestOption) (err error) {
7474
opts = slices.Concat(r.Options, opts)
75-
opts = append([]option.RequestOption{option.WithHeader("Accept", "")}, opts...)
75+
opts = append([]option.RequestOption{option.WithHeader("Accept", "*/*")}, opts...)
7676
if fileID == "" {
7777
err = errors.New("missing required fileId parameter")
7878
return

0 commit comments

Comments
 (0)