Skip to content

Commit

Permalink
feat(remote): support non-configurable responses
Browse files Browse the repository at this point in the history
  • Loading branch information
kettanaito committed Nov 15, 2024
1 parent 7c3b8c8 commit f76885d
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/RemoteHttpInterceptor.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import { ClientRequestInterceptor } from './interceptors/ClientRequest'
import { XMLHttpRequestInterceptor } from './interceptors/XMLHttpRequest'
import { handleRequest } from './utils/handleRequest'
import { RequestController } from './RequestController'
import { FetchResponse } from './utils/fetchUtils'

export interface SerializedRequest {
id: string
Expand Down Expand Up @@ -85,7 +86,8 @@ export class RemoteHttpInterceptor extends BatchInterceptor<
serializedResponse
) as SerializedResponse

const mockedResponse = new Response(responseInit.body, {
const mockedResponse = new FetchResponse(responseInit.body, {
url: request.url,
status: responseInit.status,
statusText: responseInit.statusText,
headers: responseInit.headers,
Expand Down

0 comments on commit f76885d

Please sign in to comment.