Skip to content

Commit

Permalink
fix(fromTraffic): clean generated request url (#32)
Browse files Browse the repository at this point in the history
  • Loading branch information
kettanaito authored Jun 7, 2023
1 parent 0237b4e commit c83a597
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/fromTraffic/fromTraffic.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import {
ResponseTransformer,
ResponseComposition,
DefaultBodyType,
cleanUrl,
} from 'msw'
import { decodeBase64String } from './utils/decodeBase64String'

Expand All @@ -35,7 +36,7 @@ function toRequestHandler(
const method = request.method.toLowerCase() as keyof typeof rest
const transformers = toResponseTransformers(entry)

return rest[method](request.url, (_, response) => {
return rest[method](cleanUrl(request.url), (_, response) => {
return produceResponse(response, transformers)
})
}
Expand Down

0 comments on commit c83a597

Please sign in to comment.