ルートハンドラのレスポンスをより詳細に制御したい場合、このクラスを使用できます。
code
、headers
、data
をコンストラクタに渡して、任意のルートハンドラからインスタンスを返します。
import { Response } from 'miragejs';
this.get('/users', () => {
return new Response(400, { some: 'header' }, { errors: [ 'name cannot be blank'] });
});