private static UnityNetworkingRequest CreateWebRequest(string url, WWWForm wwwForm, bool isAsset) { UnityNetworkingRequest result = null; if (wwwForm == null) { result = UnityNetworkingRequest.Get(url); } else if (isAsset) { result = UnityWebRequestAssetBundle.GetAssetBundle(url, 1); } else { result = UnityNetworkingRequest.Post(url, wwwForm); } return(result); }
public static UnityWebRequest Post(string uri, List <IMultipartFormSection> multipartFormSections) { byte[] boundary = UnityWebRequest.GenerateBoundary(); return(UnityWebRequest.Post(uri, multipartFormSections, boundary)); }