Example #1
0
        static void StoreRequestInfoForAssertion(HttpListenerContext context, ListenerAssertion assertData)
        {
            assertData.Url = context.Request.Url.AbsoluteUri;
            assertData.RequestBody = context.Request.Body();

            if (context.User != null)
            {
                var identity = context.User.Identity as HttpListenerBasicIdentity;
                if (identity != null)
                {
                    assertData.Username = identity.Name;
                    assertData.Password = identity.Password;
                }
            }
        }
Example #2
0
        static void StoreRequestInfoForAssertion(HttpListenerContext context, ListenerAssertion assertData)
        {
            assertData.Url         = context.Request.Url.AbsoluteUri;
            assertData.RequestBody = context.Request.Body();

            if (context.User != null)
            {
                var identity = context.User.Identity as HttpListenerBasicIdentity;
                if (identity != null)
                {
                    assertData.Username = identity.Name;
                    assertData.Password = identity.Password;
                }
            }
        }
Example #3
0
 static void StoreRequestInfoForAssertion(HttpListenerRequest request, ListenerAssertion assertData)
 {
     assertData.Url = request.Url.AbsoluteUri;
     assertData.RequestBody = request.Body();
 }