Skip to content

Commit 2bcd6c1

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

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

chat.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ func (r *ChatService) ListAutoPaging(ctx context.Context, query ChatListParams,
9595
// archived=false to move back to inbox
9696
func (r *ChatService) Archive(ctx context.Context, chatID string, body ChatArchiveParams, opts ...option.RequestOption) (err error) {
9797
opts = slices.Concat(r.Options, opts)
98-
opts = append([]option.RequestOption{option.WithHeader("Accept", "")}, opts...)
98+
opts = append([]option.RequestOption{option.WithHeader("Accept", "*/*")}, opts...)
9999
if chatID == "" {
100100
err = errors.New("missing required chatID parameter")
101101
return

chatreminder.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ func NewChatReminderService(opts ...option.RequestOption) (r ChatReminderService
3939
// Set a reminder for a chat at a specific time
4040
func (r *ChatReminderService) New(ctx context.Context, chatID string, body ChatReminderNewParams, opts ...option.RequestOption) (err error) {
4141
opts = slices.Concat(r.Options, opts)
42-
opts = append([]option.RequestOption{option.WithHeader("Accept", "")}, opts...)
42+
opts = append([]option.RequestOption{option.WithHeader("Accept", "*/*")}, opts...)
4343
if chatID == "" {
4444
err = errors.New("missing required chatID parameter")
4545
return
@@ -52,7 +52,7 @@ func (r *ChatReminderService) New(ctx context.Context, chatID string, body ChatR
5252
// Clear an existing reminder from a chat
5353
func (r *ChatReminderService) Delete(ctx context.Context, chatID string, opts ...option.RequestOption) (err error) {
5454
opts = slices.Concat(r.Options, opts)
55-
opts = append([]option.RequestOption{option.WithHeader("Accept", "")}, opts...)
55+
opts = append([]option.RequestOption{option.WithHeader("Accept", "*/*")}, opts...)
5656
if chatID == "" {
5757
err = errors.New("missing required chatID parameter")
5858
return

0 commit comments

Comments
 (0)