# Hide parameters after starting a web app 

**URL:** <https://forum.xojo.com/t/hide-parameters-after-starting-a-web-app/46715>\
**Category:** Web\
**Created:** [December 18, 2018, 10:12pm UTC](https://forum.xojo.com/t/hide-parameters-after-starting-a-web-app/46715 "2018-12-18T22:12:03Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Mariano\_Poli](https://forum.xojo.com/user_avatar/forum.xojo.com/mariano_poli/32/340_2.png) [@Mariano\_Poli](https://forum.xojo.com/u/Mariano_Poli)\
**Post date:** [December 18, 2018, 10:12pm UTC](https://forum.xojo.com/t/hide-parameters-after-starting-a-web-app/46715/1 "2018-12-18T22:12:03Z")

</div>

Hi everyone…  
I need to hide the parameters sent to call a WebApp after it is called.  
For instance: I need to start a WebApp that it is hosted on IP 10.10.20.5 and in the port 9000 and passing 2 parameters  
So the link will be something like: [http://10.10.20.5:9000/?Parameter1=123456&Parameter2=abcedef](http://10.10.20.5:9000/?Parameter1=123456&Parameter2=abcedef)  
I need to send these two parameters but I dont want that they remain visible at the url textfield at the top of the web browser after the web app starts.  
Is possible to hide them ?  
Thanks

---

<div class="post-metadata">

**Author:** ![Steve\_Upton](https://forum.xojo.com/letter_avatar_proxy/v4/letter/s/6de8d8/32.png) [@Steve\_Upton](https://forum.xojo.com/u/Steve_Upton)\
**Post date:** [December 18, 2018, 10:34pm UTC](https://forum.xojo.com/t/hide-parameters-after-starting-a-web-app/46715/2 "2018-12-18T22:34:18Z")

</div>

If you POST rather than GET then your parameters will be hidden and not in the URL

GET puts parameters in the URL itself (and can be insecure for calling as the parameters will also go into log files, etc)

POST is the calling method used to send web form contents to a server. The form fields are sent along with the request but not in the URL

If you look up how to POST using CURL from the command line you’ll see how it’s done.

if you don’t like CURL and want to do it from a browser, create a simple HTML web page file that has a in it and tags and submit button. Open the file into a browser and you can load it from there.

HTH

---

<div class="post-metadata">

**Author:** ![Hal\_Gumbert](https://forum.xojo.com/user_avatar/forum.xojo.com/hal_gumbert/32/160_2.png) [@Hal\_Gumbert](https://forum.xojo.com/u/Hal_Gumbert)\
**Post date:** [December 19, 2018, 3:59pm UTC](https://forum.xojo.com/t/hide-parameters-after-starting-a-web-app/46715/3 "2018-12-19T15:59:56Z")

</div>

You could load the url and when you find your parameters store them somewhere like a database, or cookie, or session. Then redirect to [http://10.10.20.5:9000](http://10.10.20.5:9000) and use the values you store previously.

---

<div class="post-metadata">

**Author:** ![Mariano\_Poli](https://forum.xojo.com/user_avatar/forum.xojo.com/mariano_poli/32/340_2.png) [@Mariano\_Poli](https://forum.xojo.com/u/Mariano_Poli)\
**Post date:** [December 21, 2018, 4:55am UTC](https://forum.xojo.com/t/hide-parameters-after-starting-a-web-app/46715/4 "2018-12-21T04:55:04Z")

</div>

@Hal Gumbert,  
Sorry for the delay in responding… Your trick works fine.

Below is a code anyone could use to hide parameters passed to a WebApp and show instead for example an UUID, after launching the webapp

Lets say that the WebApp needs 2 parameters  
You will need 3 parameters in order Hal’s trick to work  
The second and third parameters are the usefull ones for the WebApp, the ones you nedd to pass to the WebApp, and the first one is an auxiliar parameter.  
So you could call the WebApp as follows:  
[http://127.0.0.1:8080/?Param1=Anything&Param2=1234&Param3=abcd](http://127.0.0.1:8080/?Param1=Anything&Param2=1234&Param3=abcd)  
In the Session Open Event you load parameters and validate them  
The first validation is between the auxiliar parameter and a Cookie that will be unsuccesfull the first time  
so in the example it proceeds to evaluate if Param2=1234 and Param3=abcd and lets say thata they are the right ones.  
If that happened the WebApp will set a Cookie with an aleatory string… in my case I used a UUID type random string  
Then the WebApp is the auto reloaded only passing the auxiliar parameter with the UUID random value  
The Session Open Event is again excecuted because of the reloaded of the WebApp but noe with the auxiliar parameter only  
and the validation will be this time between the UUID and the Cookie Value, beeing in this case successfull too  
And at that time the WebApp finally starts with the original parameters unvisible and with an aleatory UUID as a parameter shown in the urltextfield of the browser

Code to be placed in the Session Open Event

If Self.URLParameterCount \> 0 Then  
Dim parameterName(3), value(3) As String  
For i As Integer = 0 To Self.URLParameterCount-1  
parameterName(i) = Self.URLParameterName(i)  
value(i) = Self.URLParameter(parameterName(i))  
Next  
if Value(0)=Session.Cookies.Value(“UUID”) then  
msgbox “Here is the succesfull access hiding the initial parameters”  
else  
if Value(1)=“1234” And value(2)=“abcd” then  
Session.Cookies.Set(“UUID”, GenerateUUID)  
ShowURL(“[http://127.0.0.1:8080/?UUID=](http://127.0.0.1:8080/?UUID=)” + Session.Cookies.Value(“UUID”))  
else  
break  
end if  
end If  
end if

---

<div class="post-metadata">

**Author:** ![system](https://forum.xojo.com/uploads/default/original/1X/455b4dcc0e61630e9f81940004ddffa49c432a46.png) [@system](https://forum.xojo.com/u/system)\
**Post date:** [October 29, 2020, 7:30pm UTC](https://forum.xojo.com/t/hide-parameters-after-starting-a-web-app/46715/5 "2020-10-29T19:30:00Z")

</div>


