send url using a switch.?

PeterH:
Create a function containing the client logic from your example client sketch. (Leave out the exit() call at the end of the function.)

Put the function (and any global data it requires) in your web server sketch.

Make any changes you need to that so that it carries out the HTTP request that you want.

Call that function at the point you want that request to be performed within your web server sketch.

trying to do it that way (the exit() is my addition so i dont overflow my server with requests when testing),but i cant make it work ,i see at the serial monitor window that it is connecting and sending tha request but nothing happens.When i test the example by itself ,it is working nicely.