Jean-Marc Kiener Posted May 2 Share Posted May 2 Hi, My unigui app gets called by following URL: http://myuniguiapp.com/?request_uri=http://domain2.com/?param1=1¶m2=2&myuniguiappparam1=1 As you can see, the param "request_uri" represents a URL wtih two params. var test := UniApplication.Parameters.Values['redirect_uri'] The variable test contains "http://domain2.com/?param1=1". But i need the whole text of the param "request_uri", includes all params in the url: http://domain2.com/?param1=1¶m2=2 ChatGPT says, i have to replace the & char in the param value with %26, somethinl like this: http://myuniguiapp.com/?request_uri=http://domain2.com/?param1=1%26param2=2&myuniguiappparam1=1 But i get the same result in my test variable, param2 is detected as own parameter in UniApplication.Parameters. Does anybody have a hack for that? Quote Link to comment Share on other sites More sharing options...
irigsoft Posted May 2 Share Posted May 2 52 minutes ago, Jean-Marc Kiener said: Hi, My unigui app gets called by following URL: http://myuniguiapp.com/?request_uri=http://domain2.com/?param1=1¶m2=2&myuniguiappparam1=1 As you can see, the param "request_uri" represents a URL wtih two params. var test := UniApplication.Parameters.Values['redirect_uri'] The variable test contains "http://domain2.com/?param1=1". But i need the whole text of the param "request_uri", includes all params in the url: http://domain2.com/?param1=1¶m2=2 ChatGPT says, i have to replace the & char in the param value with %26, somethinl like this: http://myuniguiapp.com/?request_uri=http://domain2.com/?param1=1%26param2=2&myuniguiappparam1=1 But i get the same result in my test variable, param2 is detected as own parameter in UniApplication.Parameters. Does anybody have a hack for that? Hello, 1. try solution from here: https://stackoverflow.com/questions/16622504/escaping-ampersand-in-url or 2. try to send URI as Base64 or 3. when you get params on server side, try to replace %26 with & and load URI in TStrings (List) Quote Link to comment Share on other sites More sharing options...
Sherzod Posted May 2 Share Posted May 2 Hello, You need to encode the string, or just try replacing & with %26 Quote Link to comment Share on other sites More sharing options...
Jean-Marc Kiener Posted May 2 Author Share Posted May 2 I already replaced the & with %26 and called my app in a browser with: http://myuniguiapp.com/?request_uri=http://domain2.com/?param1=1%26param2=2&myuniguiappparam1=1 UniApplication.parameters will not recognize it. As result, two parameters are created in uniApplication.parameters. uniApplication.Parameters.Values['redirect_uri'] = "http://domain2.com/?param1=1" // here, the second param is not present uniApplication.parameters.Values['param2'] = 2 // here we find the second parameter as a own parameter. Even if i use a & or %26 uniApplication.parameters.Values['myuniguiappparam1'] = 1 //Correct Quote Link to comment Share on other sites More sharing options...
Sherzod Posted May 2 Share Posted May 2 1 hour ago, Jean-Marc Kiener said: UniApplication.parameters will not recognize it You can use this: strVal := UniSession.ARequest.Params.Values['YourParameter']; Quote Link to comment Share on other sites More sharing options...
Jean-Marc Kiener Posted May 7 Author Share Posted May 7 Thanks! Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.