Closed crommcruach closed 2 years ago
For Example u send following URL to RESTPS: http://localhost:8080/test/route?text=das ist ein text
U will recieve this Parameter: text=das%20ist%20ein%20text" Now we could use this to decode the URL Properly:
$urlTodDecode="http://localhost:8080/?text=das%20ist%20ein%20text" $decodedURL = [System.Web.HttpUtility]::UrlDecode($urlTodDecode) echo $decodedURL Return http://localhost:8080/test/route?text=das ist ein text
So u could achive this in restps by simply replacing this line: $RawRequestURL = $script:Request.RawUrl $RawRequestURL = [System.Web.HttpUtility]::UrlDecode($script:Request.RawUrl)
ummmm, something is funky with the PR. There are 82 updated files. :-(
I am confused as to where the code change should be since 82 files are showing updates. Where do you want to add the decoding?
For Example u send following URL to RESTPS: http://localhost:8080/test/route?text=das ist ein text
U will recieve this Parameter: text=das%20ist%20ein%20text" Now we could use this to decode the URL Properly:
$urlTodDecode="http://localhost:8080/?text=das%20ist%20ein%20text" $decodedURL = [System.Web.HttpUtility]::UrlDecode($urlTodDecode) echo $decodedURL Return http://localhost:8080/test/route?text=das ist ein text
So u could achive this in restps by simply replacing this line: $RawRequestURL = $script:Request.RawUrl $RawRequestURL = [System.Web.HttpUtility]::UrlDecode($script:Request.RawUrl)