Commit 7e0605d7 authored by Jason Williams's avatar Jason Williams Committed by Hirsch Singhal
Browse files

Make underlying HTTP methods public so they can be called on a DevicePortal instance (#243)

parent d573c246
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -24,7 +24,7 @@ namespace Microsoft.Tools.WindowsDevicePortal
        /// <param name="apiPath">The relative portion of the uri path that specifies the API to call.</param>
        /// <param name="payload">The query string portion of the uri path that provides the parameterized data.</param>
        /// <returns>Task tracking the HTTP completion.</returns>
        private async Task DeleteAsync(
        public async Task DeleteAsync(
            string apiPath,
            string payload = null)
        {
@@ -38,7 +38,7 @@ namespace Microsoft.Tools.WindowsDevicePortal
        /// <param name="apiPath">The relative portion of the uri path that specifies the API to call.</param>
        /// <param name="payload">The query string portion of the uri path that provides the parameterized data.</param>
        /// <returns>Task tracking the HTTP completion.</returns>
        private async Task<T> DeleteAsync<T>(
        public async Task<T> DeleteAsync<T>(
            string apiPath,
            string payload = null) where T : new()
        {
+1 −1
Original line number Diff line number Diff line
@@ -70,7 +70,7 @@ namespace Microsoft.Tools.WindowsDevicePortal
        /// <param name="apiPath">The relative portion of the uri path that specifies the API to call.</param>
        /// <param name="payload">The query string portion of the uri path that provides the parameterized data.</param>
        /// <returns>An object of the specified type containing the data returned by the request.</returns>
        private async Task<T> GetAsync<T>(
        public async Task<T> GetAsync<T>(
            string apiPath,
            string payload = null) where T : new()
        {
+3 −3
Original line number Diff line number Diff line
@@ -27,7 +27,7 @@ namespace Microsoft.Tools.WindowsDevicePortal
        /// <param name="files">List of files that we want to include in the post request.</param>
        /// <param name="payload">The query string portion of the uri path that provides the parameterized data.</param>
        /// <returns>Task tracking the POST completion.</returns>
        private async Task PostAsync(
        public async Task PostAsync(
            string apiPath,
            List<string> files,
            string payload = null)
@@ -65,7 +65,7 @@ namespace Microsoft.Tools.WindowsDevicePortal
        /// <param name="apiPath">The relative portion of the uri path that specifies the API to call.</param>
        /// <param name="payload">The query string portion of the uri path that provides the parameterized data.</param>
        /// <returns>Task tracking the POST completion.</returns>
        private async Task PostAsync(
        public async Task PostAsync(
            string apiPath,
            string payload = null)
        {
@@ -81,7 +81,7 @@ namespace Microsoft.Tools.WindowsDevicePortal
        /// <param name="requestStream">Optional stream containing data for the request body.</param>
        /// <param name="requestStreamContentType">The type of that request body data.</param>
        /// <returns>Task tracking the POST completion.</returns>
        private async Task<T> PostAsync<T>(
        public async Task<T> PostAsync<T>(
            string apiPath,
            string payload = null,
            Stream requestStream = null,
+2 −2
Original line number Diff line number Diff line
@@ -41,7 +41,7 @@ namespace Microsoft.Tools.WindowsDevicePortal
        /// <param name="bodyData">The data to be used for the HTTP request body.</param>
        /// <param name="payload">The query string portion of the uri path that provides the parameterized data.</param>
        /// <returns>Task tracking the PUT completion.</returns>
        private async Task PutAsync<K>(
        public async Task PutAsync<K>(
            string apiPath,
            K bodyData,
            string payload = null) where K : class
@@ -58,7 +58,7 @@ namespace Microsoft.Tools.WindowsDevicePortal
        /// <param name="bodyData">The data to be used for the HTTP request body.</param>
        /// <param name="payload">The query string portion of the uri path that provides the parameterized data.</param>
        /// <returns>Task tracking the PUT completion, optional response body.</returns>
        private async Task<T> PutAsync<T, K>(
        public async Task<T> PutAsync<T, K>(
            string apiPath,
            K bodyData = null,
            string payload = null) where T : new()