I don't know if it is possible or not. I referred some site, but I didn't get exact answer.
I am using
<a href="xyz?id=4"> click </a>
When I send this request to server in the response page easily I can see "id=4" in address bar, obviously which is not secure, But in post request we cant see this.
So can we convert a get request to post or ant other way is there to hide this from address bar.
Thanks in advance.
Firstly, to convert
GET
toPOST
, simply change the link to a form:This form will not be visible and you can easily auto-submit it using JavaScript in your link:
Secondly and more importantly, both
GET
andPOST
are equally not secure over HTTP. To secure them, use HTTPS and they will be both equally secure, so no need to change ifGET
is working for you.Dynamically create a from and post it.
As Racil suggested in comments, you can also do the following
and then
Call a java script function on onclick which will make the form submission using post method or you can use ajax call to post the data and get your desired results.Use id as a parameter in function.
Make a form having single input type hidden and onclick set value of that input type hidden element and submit form using jquery.
Hopefully this will solve your problem.