Skip to content

Commit ac1a646

Browse files
fix(client): correctly specify Accept header with */* instead of empty
1 parent cf03e8b commit ac1a646

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

image.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ func (r *ImageService) List(ctx context.Context, opts ...option.RequestOption) (
6767
// Delete image
6868
func (r *ImageService) Delete(ctx context.Context, name string, opts ...option.RequestOption) (err error) {
6969
opts = slices.Concat(r.Options, opts)
70-
opts = append([]option.RequestOption{option.WithHeader("Accept", "")}, opts...)
70+
opts = append([]option.RequestOption{option.WithHeader("Accept", "*/*")}, opts...)
7171
if name == "" {
7272
err = errors.New("missing required name parameter")
7373
return

instance.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ func (r *InstanceService) List(ctx context.Context, opts ...option.RequestOption
7373
// Stop and delete instance
7474
func (r *InstanceService) Delete(ctx context.Context, id string, opts ...option.RequestOption) (err error) {
7575
opts = slices.Concat(r.Options, opts)
76-
opts = append([]option.RequestOption{option.WithHeader("Accept", "")}, opts...)
76+
opts = append([]option.RequestOption{option.WithHeader("Accept", "*/*")}, opts...)
7777
if id == "" {
7878
err = errors.New("missing required id parameter")
7979
return

volume.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ func (r *VolumeService) List(ctx context.Context, opts ...option.RequestOption)
6767
// Delete volume
6868
func (r *VolumeService) Delete(ctx context.Context, id string, opts ...option.RequestOption) (err error) {
6969
opts = slices.Concat(r.Options, opts)
70-
opts = append([]option.RequestOption{option.WithHeader("Accept", "")}, opts...)
70+
opts = append([]option.RequestOption{option.WithHeader("Accept", "*/*")}, opts...)
7171
if id == "" {
7272
err = errors.New("missing required id parameter")
7373
return

0 commit comments

Comments
 (0)