diff options
Diffstat (limited to '.changeset/yellow-tips-cover.md')
-rw-r--r-- | .changeset/yellow-tips-cover.md | 26 |
1 files changed, 0 insertions, 26 deletions
diff --git a/.changeset/yellow-tips-cover.md b/.changeset/yellow-tips-cover.md deleted file mode 100644 index fb373374e..000000000 --- a/.changeset/yellow-tips-cover.md +++ /dev/null @@ -1,26 +0,0 @@ ---- -'astro': patch ---- - -Deprecate returning simple objects from endpoints. Endpoints should only return a `Response`. - -To return a result with a custom encoding not supported by a `Response`, you can use the `ResponseWithEncoding` utility class instead. - -Before: - -```ts -export function GET() { - return { - body: '...', - encoding: 'binary', - }; -} -``` - -After: - -```ts -export function GET({ ResponseWithEncoding }) { - return new ResponseWithEncoding('...', undefined, 'binary'); -} -``` |