[IL2CPP] Exception: Error: called non-existent method System.Collections.Specialized.NameValueCollec

Ok the problem is “simple”:
IL2CPP is missing System.Web.HttpUtility.ParseQueryString method (for what I understand is the full System.Web that is missing).
It’s possible to replace it?
Will Unity implement it in the future?

In mono (android) everything works… but with mono I cannot do a 64-bit build.
Since IL2CPP is the future (and the only supported scripting backend for iOS) I really wish there is a way to workaround this problem.

Not sure if Unity will add the support for it or I should write it on my own but I really want to solve this problem.

Right now the problem is with this plugin (not made for Unity):

line 1080.
I already tried this:

and I already tried this solution:

private Dictionary<string, string> ParseQueryString(string url) {
    var querystring = url.Substring(url.IndexOf('?') + 1);
    var pairs = querystring.Split('&');
    var dict = pairs.Select(pair => { var valuePair = pair.Split('=');
    return new KeyValuePair<string, string>(valuePair[0], valuePair[1]); }) .ToDictionary((kvp) => kvp.Key, (kvp) => kvp.Value); return dict;
}

Both are not working.
I also tried to modify the RestSharp code by copying the original source code of those classes:

But I was only able to get a BadApi response.

I already had to recompile JSON .NET For Unity | Input Management | Unity Asset Store
since MegaApiClient require version 10 (and json net for unity is version 8.3 but 100% compatible).

Any ideas? Thank you.

PS. After a bit of debugging I even tried

 UriBuilder builder = new UriBuilder(BaseApiUri);
      var arguments = "";
      foreach (var item in query)
      {
        arguments = arguments + item.Key + "=" + item.Value + "&";
      }
      arguments = arguments.Substring(0, arguments.Length -1);

      builder.Query = arguments.ToString();
      return builder.Uri;

This stupid solution still works on the Editor but it still give an ApiException: BadSessionId on mobile (a MegaApiClient Exception).
/// API_ESID (-15): Invalid or expired user session, please relogin

Not sure why at this point.

The stupid solution works but IL2CPP also do same stripping that the old Mono does not (in Mono I can disable stripping, while in IL2CPP the minimum is Low).
To solve this little (but very annoying problem) you need to create a link.xml file:

<linker>
   <assembly fullname="MegaApiClient"> // the name of the assembly
      <type fullname="CG.Web.MegaApiClient.*" preserve="all"/> // excludes all namespaces and classes recursively under MyNamespace
   </assembly>
</linker>

With this everything works again.