Set Variable (env or global) from a url string

Just as a plain text string?

So if you were to do something like:

pm.globals.set("url", pm.response.text())

It would set that URL as the global variable?