Getting Back to a Clean URL

I have my Arduino Uno Wifi REV2 set up as a web server for some simple control. I am using an HTML GET to pull in the parameters. Is there an easy way to get back to a pristine URL after processing the call? For example, after the GET the URL is:
http://192.168.1.175/control?LightOn=17%3A30&LightOff=20%3A00

I don't want the state "remembered." I just want

http://192.168.1.175/

Thanks in advance,
Greg

I don't want the state "remembered." I just want

Given I understand your intention correctly, this is usually quite easy to accomplish but as you failed to post your code we're unable to provide any help to you.

strrchr comes to mind if you're using c-strings.

Note also that it's not a good idea to use GET requests to modify a server's state. This is because browsers can and do follow links so they can cache them and make them faster, which can mess up your data if the browser decides to make a GET request which might change the server's state.

POST requests are designed for anything that may modify state of the server (that's why you might sometimes see a "confirm submitting form" message in a browser when you refresh a page after submitting a form--the browser doesn't automatically fetch the page again using POST because it knows it can modify the server's state again, which is not necessarily desirable).

This topic was automatically closed 120 days after the last reply. New replies are no longer allowed.