I have been creating a program in Processing Java to get the HTML of a site with HTTP GET in the Networking Library. I followed the instructions in the Processing Network Tutorial, but it only shows how to get the HTML for one site, www.ucla.edu.
I initially started this topic because I got a 400 Bad request code, but now I realize the documentation of the network library is not great, and I don’t have a clue how to redirect to a different site.
The tutorial says I should use
Client c; c = new Client(this, "www.ucla.edu", 80); // Connect to server on port 80 c.write("GET / HTTP/1.0\n"); // Use the HTTP "GET" command to ask for a webpage c.write("Host: www.ucla.edu\n\n"); // Tell the server for which domain you are making the request
but I can’t use this to connect to other sites or pages.
Does anyone know the way to connect to other sites?
Thanks and sorry this is really badly worded…