How do I get into the data returned from a UnityWebRequest ?

I used the example from the unity manual and threw in more Debug.Log lines to show status:

    IEnumerator GetText()
    {
        UnityWebRequest www = new UnityWebRequest("https://www.investopedia.com/markets/api/partial/historical/?Symbol=SPY&Type=Historical+Prices&Timeframe=Daily&StartDate=Dec+31%2C+2018");
        www.downloadHandler = new DownloadHandlerBuffer();
        yield return www.SendWebRequest();
        Debug.Log("TickerScraper.GetText " + www.isNetworkError + "  " + www.isHttpError);

        if (www.isNetworkError || www.isHttpError)
        {
            Debug.Log("TickerScraper.isNetworkError");
            Debug.Log(www.error);
        }
        else
        {
            // Show results as text
            Debug.Log("TickerScraper.downloadHandler.text");
            Debug.Log(www.downloadHandler.text);
            // Or retrieve results as binary data
            byte[] results = www.downloadHandler.data;
        }

And the isNet and isHttp erros are flase so the request looks like it worked. I can not find any examples of how to get to the text data itself. There are two data lines past the headings on the page:

Date Open High Low Adj. Close Volume
Jan 02, 2019 13.80 14.55 13.61 14.37 14,862,962

Dec 31, 2018 14.23 14.25 13.64 14.03 7,636,510

The log shows :

01-03 23:23:54.938: I/Unity(10070): TickerScraper.downloadHandler.text

01-03 23:23:54.938: I/Unity(10070): c__Iterator0:MoveNext() (at C:\Users\User\Documents\UnityProjects\Project\Assets\TickerScraper.cs:33)

So I am very excited this worked. I am using this page because of the low text bytes count. I have other larger web pages I will be requesting from. Just wanted to keep it simple at first.

In further research I found this line:

        if (result != null)
            result(www.downloadHandler.text);

But how is result then accessed or displayed?

Any help would be appreciated.
Thanks in advance.

An example might be easier. Drop this script onto an empty scene:

using System;
using System.Collections;
using UnityEngine;
using UnityEngine.Networking;

public class WebRequestExample : MonoBehaviour
{
	// Where to send our request
	const string DEFAULT_URL = "https://jsonplaceholder.typicode.com/todos/1";
	string targetUrl = DEFAULT_URL;

	// Keep track of what we got back
	string recentData = "";

	void Awake()
	{
		this.StartCoroutine(this.RequestRoutine(this.targetUrl, this.ResponseCallback));
	}

	// Web requests are typially done asynchronously, so Unity's web request system
	// returns a yield instruction while it waits for the response.
	//
	private IEnumerator RequestRoutine(string url, Action<string> callback = null)
	{
		// Using the static constructor
		var request = UnityWebRequest.Get(url);

		// Wait for the response and then get our data
		yield return request.SendWebRequest();
		var data = request.downloadHandler.text;

		// This isn't required, but I prefer to pass in a callback so that I can
		// act on the response data outside of this function
		if (callback != null)
			callback(data);
	}

	// Callback to act on our response data
	private void ResponseCallback(string data)
	{
		Debug.Log(data);
		recentData = data;
	}

	// Old fashioned GUI system to show the example
	void OnGUI()
	{
		this.targetUrl = GUI.TextArea(new Rect(0, 0, 500, 100), this.targetUrl);
		GUI.TextArea(new Rect(0, 100, 500, 300), this.recentData);
		if (GUI.Button(new Rect(0, 400, 500, 100), "Resend Request"))
		{
			this.StartCoroutine(this.RequestRoutine(targetUrl, this.ResponseCallback));
		}
	}
}

This will give you a screen that starts off looking like the image. You can edit the topmost box to change the URL and then resend the request with the button, with the response data being printed into that box.

130504-requests.gif

This doesn’t seem to work when built to WebGL.
Help please?