Read Webserver data?

Is there a way to read a simple webserver value into GH? gHowl is an xml solution not working…

FIrefly can read basic arduino (needs a wire) but how to read values posted to a local webserver on an ESP8266?

Take values, using timer block reads, use for a slider to control geometry?

Any ideas?

image

using System.xml;

  private void RunScript(object x, object y, ref object A)
  {
    List<string> str = new List<string>();
    string URL = "http://localhost/books.xml";
    XmlTextReader reader = new XmlTextReader(URL);

    while (reader.Read())
    {
      switch (reader.NodeType)
      {

        case XmlNodeType.Text: //Display the text in each element.
          str.Add(reader.Value);
          break;
      }
    }

    A = str;

something like this?
capture-20210802-205247

or for html file to string:

using System.Net;

 string s = "";
    WebClient client = new WebClient();

    s = client.DownloadString("https://discourse.mcneel.com/t/read-webserver-data/128214/2");


    A = s;
1 Like