Closed novitae closed 8 months ago
It's because request.url
is read-only.
To change the URL components, please use the code:
function onRequest(context, url, request) {
request.scheme = "http";
request.host = "proxyman.dev";
request.port = 9090;
request.path = "v1/data/user";
return request;
}
Snippet Code: https://docs.proxyman.io/scripting/snippet-code#change-request-destination-scheme-host-port-path
Description
When making a script, and in
onRequest
doingrequest.url = "https://mynew.url/"
, the URL of the request doesn't change. Is it normal ?Steps to Reproduce
Current Behavior
Url not changed
Expected Behavior
Url changed to the new one
Environment