Exemplo n.º 1
0
        internal static string ParseSetObjectPropertyUrl(int numObjectIds, HttpResponseMessage response)
        {
            if (numObjectIds > 1)
            {
                if (response.RequestMessage?.RequestUri?.AbsolutePath == "/error.htm")
                {
                    RequestEngine.SetErrorUrlAsRequestUri(response);
                }
            }

            return(null);
        }
Exemplo n.º 2
0
        internal static string CloneRequestParser(HttpResponseMessage response)
        {
            if (response.StatusCode == HttpStatusCode.BadRequest)
            {
                return(null);
            }

            var message = response.RequestMessage.RequestUri.ToString();

            if (message.Contains("the object is currently not valid"))
            {
                RequestEngine.SetErrorUrlAsRequestUri(response);
            }

            return(message);
        }
Exemplo n.º 3
0
        internal static PrtgResponse CloneRequestParser(HttpResponseMessage response)
        {
            if (response.StatusCode == HttpStatusCode.BadRequest)
            {
                return(null);
            }

            var message = response.RequestMessage.RequestUri.ToString();

            //todo: does this work with other languages? Not sure how to replicate it
            if (message.Contains("the object is currently not valid"))
            {
                RequestEngine.SetErrorUrlAsRequestUri(response);
            }

            return(message);
        }