You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
HttpResponse.redirect(url, { status = 303, headers }): a real redirect (301/302/303/307/308) with Location, for native form posts (#990, #992).
HttpResponse.noContent({ headers }): a 204 with no body.
HttpResponse.text(body, { status, headers }): text/plain; charset=utf-8 (overridable); statuses ≥ 400 get no-store like .json().
Stream routes accept an HttpResponse (#714): a this.stream() handler can return e.g. HttpResponse.error(502, …).
Upgrade notes
useQuery/useMutation now read a 204/205 response as null data (before: onError with a SyntaxError), and a text/plain body as a string; a text/plain error becomes a refusal whose message is the text.
HttpResponse.json(x, { status: 204 }) now throws; use HttpResponse.noContent().
Redirect.to/Redirect.external on API routes still answer 200 {} (documented); use HttpResponse.redirect for a real redirect.