C#C
C#13mo ago
Kushiwushi

Ending of curly braces results in an error?

c-sharp 
namespace SpotifyLyrics
{
    public class SpotifyAPI
    {
        private string MainURL = "https://curly-orbit-g4459qpggwg5cpg4g-8000.app.github.dev/trackid/"; 
        private string Track = "0MnTkIEP4zZN1IUSu8MvIz"; 

        public async Task<string> RequestAPI(string track)
        {
            this.Track = track;
            string requestApiUrl = MainURL + track;

            using (HttpClient client = new HttpClient())
            {
                HttpResponseMessage response = await client.GetAsync(requestApiUrl);

                string lyrics = await response.Content.ReadAsStringAsync();
                return lyrics;
            }
        }
    }


here's the code
image.png
Was this page helpful?