예제 #1
0
        protected UnityWebRequestAsyncOperation Send(UnityWebRequest request,
                                                     IEnumerable <KeyValuePair <string, object> > headers)
        {
            var hx   = headers?.ToList() ?? new List <KeyValuePair <string, object> >();
            var pRef = hx.FetchHeader <WeakReference <IProgress <float> > >(InternalHeaders.ProgressObject);

            if (null == pRef)
            {
                return(request.AppendHeaders(hx).SendWebRequest());
            }

            var wrapper = new UnityWebRequestReporter.ReporterWrapper(pRef, request);

            UnityWebRequestReporter.AddReporterRef(requestId, wrapper);

            return(request.SendWebRequest());
        }