Reading from Streaming Assets in WebGL

I’m trying to set up my Unity game for WebGL, but I quickly found out that you can’t access your streaming assets as you would in a standalone build. For example, I have a code snippet below of how I load in all of my game’s text for localization (i.e. get english translations of all text in my UI).

public void LoadLocalizedText(string fileName) {         localizedText = new Dictionary<string, string>();         // StreamingAssetsPath will always be known to unity, regardless of hardware         string filePath = Path.Combine(Application.streamingAssetsPath, fileName);           if (File.Exists(filePath)) {             string dataAsJson = File.ReadAllText(filePath);              // deserialize text from text to a LocalizationData object             LocalizationData loadedData = JsonUtility.FromJson<LocalizationData>(dataAsJson);              for(int i = 0; i < loadedData.texts.Length; i++) {                 localizedText.Add(loadedData.texts[i].key, loadedData.texts[i].value);             }         }         else {             // ideally would handle this more gracefully, than just throwing an error (e.g. a pop up)             Debug.LogError("Cannot find file");         }                  isReady = true;     } 

I’ve been looking at online examples, and there’s a lot of obsolete examples regarding the use of unity’s WWW class and php. From what I understand the UnityWebRequest is now the way to go, but I’m confused how to use it with regards to the example above. I’m also trying to figure out how to connect to my SQLite database which is also stored in streamingAssets.

        public SqliteHelper(string databaseFileName) {         if (Application.platform == RuntimePlatform.WebGLPlayer) {             // ????????         }         else {             tag = databaseFileName + ":\t";              string dbPath = Path.Combine(Application.streamingAssetsPath, databaseFileName);               if (System.IO.File.Exists(dbPath)) {                 dbConnectionString = "URI=file:" + dbPath;             }             else {                 Debug.Log ("ERROR: the file DB named " + databaseFileName + " doesn't exist anywhere");             }         }     } 

Now that I can’t just open an SqliteConnection, I have no idea if there’s a c# only solution, or if I have to learn php as suggested from tutorials such as this one. If someone could walk me through how to solve either of these problems I would greatly appreciate it.