C# A function to make custom requests

This method is supposed to make a custom requests and then get its response. Sometimes, the response is a string, and most the time the response is in JSON format. As far as I know I can’t have a function which returns either a string or a json format. So because of that I have the same method twice but one returns a string and other the json format. (This could be solved with a void return’s type maybe? not sure tho).

This is the method code. I’m interested not only in fixing the problem of the types that the function returns but also in the function itself, perhaps it could be improved. Any advice is welcome. Thanks!

// Function to make custom requests to the LCU's endpoints.
        private String Request(string method, string endpoint, string query = "", string data = "")
        {
            HttpWebRequest httpRequest;
            HttpWebResponse httpResponse;

            // If it has query
            if (query.Length > 0)
                httpRequest = (HttpWebRequest)WebRequest.Create(URL + endpoint + "?" + query);
            else
                httpRequest = (HttpWebRequest)WebRequest.Create(URL + endpoint);

            // Encoce USER:PASS for the HTTP Basic
            string svcCredentials = Convert.ToBase64String(ASCIIEncoding.ASCII.GetBytes("riot:" + PASS));

            // Skip SSL
            httpRequest.ServerCertificateValidationCallback += (sender, certificate, chain, sslPolicyErrors) => true;

            // Headers
            httpRequest.Headers.Add("Authorization", "Basic " + svcCredentials);

            // Method we will use.
            httpRequest.Method = method;

            // If it has data.
            if (data.Length > 0) {
                using (var streamWriter = new StreamWriter(httpRequest.GetRequestStream())) {
                    streamWriter.Write(data);
                }
            }

            // Get the response from the request.
            try { httpResponse = (HttpWebResponse)httpRequest.GetResponse(); }
            catch (Exception) { Console.WriteLine("Error..."); return "Error..."; }

            using (var streamReader = new StreamReader(httpResponse.GetResponseStream()))
            {
                try
                {
                    return streamReader.ReadToEnd();
                }
                catch (Exception)
                {
                    return "Error...";
                }

            }
        }

UPDATED:

        async void Request_2(HttpMethod method, string endpoint, string query = "", string data = "")
        {     
            HttpRequestMessage request;
            HttpResponseMessage response;

            // If it has query
            if (query.Length > 0)
                request = new HttpRequestMessage(method, URL + endpoint + "?" + query);
            else
                request = new HttpRequestMessage(method, URL + endpoint);

            // Encode USER:PASS for the HTTP Basic
            string svcCredentials = Convert.ToBase64String(ASCIIEncoding.ASCII.GetBytes("riot:" + PASS));

            // Skip SSL
            ServicePointManager.ServerCertificateValidationCallback += (sender, cert, chain, sslPolicyErrors) => true;

            // Headers
            request.Headers.Add("Authorization", "Basic " + svcCredentials);

            if (data.Length > 0)
                request.Content = new StringContent(data, Encoding.UTF8, "application/json");

            response = await client.SendAsync(request);
            string result = await response.Content.ReadAsStringAsync();
            Console.WriteLine(result);
        }
```