Confused with Server Connect > Globals > $_SERVER

Trying to use the REQUEST_URI and the HTTP_SERVER_AGENT in an API call

In Server Connect, i open Globals, I add a new variable named REQUEST_URI and then try use the picker in the API Action > Input Data to pick that variable, the picker shows {{$_SERVER.REQUEST_URI}} which does not work as expected, so i alter my variable name to ['REQUEST_URI'] OR 'REQUEST_URI' OR [REQUEST_URI] to try them all and then the data picker doubles up like this {{$_SERVER['['REQUEST_URI']']}}

Am i using this wrong or something.

EDIT: also tried making my variables Text, Array and Object
Only way I have sort of managed this so far is to make the variables text, name them just the basic REQUEST_URI and in the bindings picker change it from {{$_SERVER.REQUEST_URI}} to {{$_SERVER['REQUEST_URI']}} which then gets it working as I would have expected.

Now my final thing I am battling with is adding the .urlencode() to this, should it be {{$_SERVER['REQUEST_URI.urlencode()']}} because I have tried a few ways and when i try give an unencoded url it fails

Community Page
Last updated: