Skip to content

Commit

Permalink
fix: use Accept: */* as a default Header for void endpoints
Browse files Browse the repository at this point in the history
  • Loading branch information
stainless-bot authored and luwes committed Jan 25, 2024
1 parent d1e37f1 commit baf0235
Show file tree
Hide file tree
Showing 6 changed files with 16 additions and 16 deletions.
2 changes: 1 addition & 1 deletion src/resources/system/signing-keys.ts
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ export class SigningKeys extends APIResource {
delete(signingKeyId: string, options?: Core.RequestOptions): Core.APIPromise<void> {
return this._client.delete(`/system/v1/signing-keys/${signingKeyId}`, {
...options,
headers: { Accept: '', ...options?.headers },
headers: { Accept: '*/*', ...options?.headers },
});
}
}
Expand Down
6 changes: 3 additions & 3 deletions src/resources/video/assets.ts
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ export class Assets extends APIResource {
delete(assetId: string, options?: Core.RequestOptions): Core.APIPromise<void> {
return this._client.delete(`/video/v1/assets/${assetId}`, {
...options,
headers: { Accept: '', ...options?.headers },
headers: { Accept: '*/*', ...options?.headers },
});
}

Expand Down Expand Up @@ -110,7 +110,7 @@ export class Assets extends APIResource {
): Core.APIPromise<void> {
return this._client.delete(`/video/v1/assets/${assetId}/playback-ids/${playbackId}`, {
...options,
headers: { Accept: '', ...options?.headers },
headers: { Accept: '*/*', ...options?.headers },
});
}

Expand All @@ -121,7 +121,7 @@ export class Assets extends APIResource {
deleteTrack(assetId: string, trackId: string, options?: Core.RequestOptions): Core.APIPromise<void> {
return this._client.delete(`/video/v1/assets/${assetId}/tracks/${trackId}`, {
...options,
headers: { Accept: '', ...options?.headers },
headers: { Accept: '*/*', ...options?.headers },
});
}

Expand Down
12 changes: 6 additions & 6 deletions src/resources/video/live-streams.ts
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ export class LiveStreams extends APIResource {
delete(liveStreamId: string, options?: Core.RequestOptions): Core.APIPromise<void> {
return this._client.delete(`/video/v1/live-streams/${liveStreamId}`, {
...options,
headers: { Accept: '', ...options?.headers },
headers: { Accept: '*/*', ...options?.headers },
});
}

Expand All @@ -98,7 +98,7 @@ export class LiveStreams extends APIResource {
complete(liveStreamId: string, options?: Core.RequestOptions): Core.APIPromise<void> {
return this._client.put(`/video/v1/live-streams/${liveStreamId}/complete`, {
...options,
headers: { Accept: '', ...options?.headers },
headers: { Accept: '*/*', ...options?.headers },
});
}

Expand Down Expand Up @@ -150,7 +150,7 @@ export class LiveStreams extends APIResource {
): Core.APIPromise<void> {
return this._client.delete(`/video/v1/live-streams/${liveStreamId}/playback-ids/${playbackId}`, {
...options,
headers: { Accept: '', ...options?.headers },
headers: { Accept: '*/*', ...options?.headers },
});
}

Expand All @@ -166,7 +166,7 @@ export class LiveStreams extends APIResource {
): Core.APIPromise<void> {
return this._client.delete(
`/video/v1/live-streams/${liveStreamId}/simulcast-targets/${simulcastTargetId}`,
{ ...options, headers: { Accept: '', ...options?.headers } },
{ ...options, headers: { Accept: '*/*', ...options?.headers } },
);
}

Expand All @@ -182,7 +182,7 @@ export class LiveStreams extends APIResource {
disable(liveStreamId: string, options?: Core.RequestOptions): Core.APIPromise<void> {
return this._client.put(`/video/v1/live-streams/${liveStreamId}/disable`, {
...options,
headers: { Accept: '', ...options?.headers },
headers: { Accept: '*/*', ...options?.headers },
});
}

Expand All @@ -192,7 +192,7 @@ export class LiveStreams extends APIResource {
enable(liveStreamId: string, options?: Core.RequestOptions): Core.APIPromise<void> {
return this._client.put(`/video/v1/live-streams/${liveStreamId}/enable`, {
...options,
headers: { Accept: '', ...options?.headers },
headers: { Accept: '*/*', ...options?.headers },
});
}

Expand Down
2 changes: 1 addition & 1 deletion src/resources/video/playback-restrictions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ export class PlaybackRestrictions extends APIResource {
delete(playbackRestrictionId: string, options?: Core.RequestOptions): Core.APIPromise<void> {
return this._client.delete(`/video/v1/playback-restrictions/${playbackRestrictionId}`, {
...options,
headers: { Accept: '', ...options?.headers },
headers: { Accept: '*/*', ...options?.headers },
});
}

Expand Down
8 changes: 4 additions & 4 deletions src/resources/video/spaces.ts
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ export class Spaces extends APIResource {
delete(spaceId: string, options?: Core.RequestOptions): Core.APIPromise<void> {
return this._client.delete(`/video/v1/spaces/${spaceId}`, {
...options,
headers: { Accept: '', ...options?.headers },
headers: { Accept: '*/*', ...options?.headers },
});
}

Expand Down Expand Up @@ -107,7 +107,7 @@ export class Spaces extends APIResource {
): Core.APIPromise<void> {
return this._client.delete(`/video/v1/spaces/${spaceId}/broadcasts/${broadcastId}`, {
...options,
headers: { Accept: '', ...options?.headers },
headers: { Accept: '*/*', ...options?.headers },
});
}

Expand Down Expand Up @@ -141,7 +141,7 @@ export class Spaces extends APIResource {
startBroadcast(spaceId: string, broadcastId: string, options?: Core.RequestOptions): Core.APIPromise<void> {
return this._client.post(`/video/v1/spaces/${spaceId}/broadcasts/${broadcastId}/start`, {
...options,
headers: { Accept: '', ...options?.headers },
headers: { Accept: '*/*', ...options?.headers },
});
}

Expand All @@ -157,7 +157,7 @@ export class Spaces extends APIResource {
stopBroadcast(spaceId: string, broadcastId: string, options?: Core.RequestOptions): Core.APIPromise<void> {
return this._client.post(`/video/v1/spaces/${spaceId}/broadcasts/${broadcastId}/stop`, {
...options,
headers: { Accept: '', ...options?.headers },
headers: { Accept: '*/*', ...options?.headers },
});
}
}
Expand Down
2 changes: 1 addition & 1 deletion src/resources/video/transcription-vocabularies.ts
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ export class TranscriptionVocabularies extends APIResource {
delete(transcriptionVocabularyId: string, options?: Core.RequestOptions): Core.APIPromise<void> {
return this._client.delete(`/video/v1/transcription-vocabularies/${transcriptionVocabularyId}`, {
...options,
headers: { Accept: '', ...options?.headers },
headers: { Accept: '*/*', ...options?.headers },
});
}
}
Expand Down

0 comments on commit baf0235

Please sign in to comment.