Reputation: 76077
I'm using the request
npm module to access a REST service, that needs at some point requires a backslash (\
) in part of the path to escape a especial character (it implements a small query DSL).
To my surprise, request is converting those backslashes to forward slashes (/
). I've drilled down the problem a little bit more and it seems that it is calling url.parse
under the hood and that is the culprit. I can pass a url.parse
result with the proper path, but I don't see any option to avoid the back to forward slash conversion.
The ugly option might be to hack the url.parse
result myself...
Upvotes: 2
Views: 2441