Ejemplo n.º 1
0
        internal void CopyTo(Request?request)
        {
            if (request == null)
            {
                return;
            }

            request.Url ??= Url;
            request.Method ??= Method;
            request.Data ??= Data;
            request.QueryString ??= QueryString;
            request.Cookies ??= Cookies;

            InternalEnv?.TryCopyTo(request.Env);
            InternalOther?.TryCopyTo(request.Other);
            InternalHeaders?.TryCopyTo(request.Headers);
        }
Ejemplo n.º 2
0
        internal void CopyTo(Request request)
        {
            if (request == null)
            {
                return;
            }

            if (request.Url == null)
            {
                request.Url = Url;
            }

            if (request.Method == null)
            {
                request.Method = Method;
            }

            if (request.Data == null)
            {
                request.Data = Data;
            }

            if (request.QueryString == null)
            {
                request.QueryString = QueryString;
            }

            if (request.Cookies == null)
            {
                request.Cookies = Cookies;
            }

            InternalEnv?.TryCopyTo(request.Env);
            InternalOther?.TryCopyTo(request.Other);
            InternalHeaders?.TryCopyTo(request.Headers);
        }