Commit 6a0e8e28 authored by Jason Williams's avatar Jason Williams
Browse files

Adds User-Agent string to all requests for identifying calls from WDPW

Uses the User-Agent string "WindowsDevicePortalWrapper/GitHub Open Source Project"
parent 80764d1d
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -36,7 +36,7 @@ namespace Microsoft.Tools.WindowsDevicePortal

            using (HttpClient client = new HttpClient(handler))
            {
                this.ApplyCsrfToken(client, "GET");
                this.ApplyHttpHeaders(client, "GET");

                Task<HttpResponseMessage> getTask = TestHelpers.MockHttpResponder.GetAsync(uri);
                await getTask.ConfigureAwait(false);
+1 −1
Original line number Diff line number Diff line
@@ -30,7 +30,7 @@ namespace Microsoft.Tools.WindowsDevicePortal

            using (HttpClient client = new HttpClient(requestSettings))
            {
                this.ApplyCsrfToken(client, "DELETE");
                this.ApplyHttpHeaders(client, "DELETE");

                Task<HttpResponseMessage> deleteTask = TestHelpers.MockHttpResponder.DeleteAsync(uri);
                await deleteTask.ConfigureAwait(false);
+1 −1
Original line number Diff line number Diff line
@@ -43,7 +43,7 @@ namespace Microsoft.Tools.WindowsDevicePortal

            using (HttpClient client = new HttpClient(handler))
            {
                this.ApplyCsrfToken(client, "GET");
                this.ApplyHttpHeaders(client, "GET");

                Task<HttpResponseMessage> getTask = TestHelpers.MockHttpResponder.GetAsync(uri);
                await getTask.ConfigureAwait(false);
+1 −1
Original line number Diff line number Diff line
@@ -30,7 +30,7 @@ namespace Microsoft.Tools.WindowsDevicePortal

            using (HttpClient client = new HttpClient(requestSettings))
            {
                this.ApplyCsrfToken(client, "POST");
                this.ApplyHttpHeaders(client, "POST");

                Task<HttpResponseMessage> postTask = TestHelpers.MockHttpResponder.PostAsync(uri, null);
                await postTask.ConfigureAwait(false);
+1 −1
Original line number Diff line number Diff line
@@ -33,7 +33,7 @@ namespace Microsoft.Tools.WindowsDevicePortal

            using (HttpClient client = new HttpClient(requestSettings))
            {
                this.ApplyCsrfToken(client, "PUT");
                this.ApplyHttpHeaders(client, "PUT");

                // Send the request
                Task<HttpResponseMessage> putTask = TestHelpers.MockHttpResponder.PutAsync(uri, body);
Loading