We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
I am getting a server error when I try to get the request response (request.GetResponseAsync)
WebRequest request = WebRequest.Create("https://play.ht/api/v1/convert"); request.Method = "POST"; request.ContentType = "application/json"; request.Headers.Set("Authorization", "authkey"); request.Headers.Set("X-User-ID", "userid"); using (var streamWriter = new StreamWriter(request.GetRequestStream())) { string json = "{\"voice\":\"es-ES-Standard-A\"," + "\"content\":\"What is the weather today\"}"; streamWriter.Write(json); } WebResponse response = await request.GetResponseAsync(); Console.WriteLine(((HttpWebResponse)response).StatusDescription); using (var dataStream = new StreamReader(response.GetResponseStream())) { string responseFromServer = dataStream.ReadToEnd(); Console.WriteLine("Server Response: " + responseFromServer); } response.Close();
The text was updated successfully, but these errors were encountered:
No branches or pull requests
I am getting a server error when I try to get the request response (request.GetResponseAsync)
The text was updated successfully, but these errors were encountered: