示例#1
0
        public PrivateApiResponse <object> SendRequestWithIdentityHeader(object content, string headerName, string headerValue, HttpMethod httpMethod, string contentType = "application/json")
        {
            string contentString = ConvertToJsonString(content);

            using (LogHelper.LoggerForCurrentTest.EnterReproStep($"Send request that contains X-IDENTITY header with {InternalTestEndpoint}"))
            {
                InternalConnection.DeleteAllCookies();
                InternalConnection.Headers.Clear();
                InternalConnection.Headers.Add(headerName, headerValue);
                return(ProcessResponseWithContent <object>(InternalConnection.SendAsync(InternalTestEndpoint, contentString, httpMethod, contentType).Result));
            }
        }