Closed ramiromagno closed 5 years ago
Hard for me to say with certainty what's going on without seeing the code you ran to generate this, but it is expected behavior that all occurrences of the regular expression pattern are replaced, not just the first one--that's what gsub()
does. And gsub_request/response()
do not currently un-escape URL-encoded strings (though one might want it to), so it's not surprising that if /
is encoded to %2F
that the regular expression won't match it.
OK, thank you!
Example:
The URL:
Gets written as:
If I use instead:
Then I get the expected mock file: