title: How to send song to API?
body: <p>I have an assignment where I am supposed to send a youtube song in the format to a url. <a href="https://docs.google.com/document/d/1qcHnLnpWWL8DTKhKOUCubYZn-ZpmI_u6dl5beHN831c/edit" rel="nofollow noreferrer">(Further Explanation)</a>:</p>
  
  <pre><code> {"title":"Roar", "artist":"Katy Perry", "rating":5, "youtubeID":"CevxZvSJLk8", "key":"rf3498phfwqvwlie457fghwlriq347fl"}
  </code></pre>
  
  <p>The song is supposed to show up in a database:</p>
  
  <p><a href="http://fury.cse.buffalo.edu/musicRatings/getAllSongs" rel="nofollow noreferrer">http://fury.cse.buffalo.edu/musicRatings/getAllSongs</a></p>
  
  <p>This is what I have so far which I feel is completed, also no errors: </p>
  
  <pre><code>    import java.io.IOException;
  
      import org.apache.http.client.fluent.Request;
      import org.apache.http.entity.ContentType;
  
      import com.eclipsesource.json.JsonObject;
  
  
      public class Lab10 {
  
            public static void main(String[] args) {
  
              }
  
  
          public static String postRequest(String url, String params){
              String response = "";
              try{
                  response = Request.Post(url)
                          .bodyString(params, ContentType.DEFAULT_TEXT)
                          .execute().returnContent().asString();
              }catch(IOException ex){
                  ex.printStackTrace();
              }
  
              return response;
          }
  
  
         public static String lab() {
  
  
              JsonObject song = new JsonObject();
              song.add("title", "Sweater Weather");
              song.add("artist","TheNeighbourhood");
              song.add("rating",4);
              song.add("youtubeID","GCdwKhTtNNw");
              song.add("key","v5eysvylja457gnu0p62szurzrqcf6n8");
  
              String ans = song.toString(); 
              return postRequest("http://fury.cse.buffalo.edu/musicRatings/addSong", ans);
          }
      }`
  </code></pre>
  
  <p>It still does not show in the database when searching with ctrl+F. Is the way I'm returning it wrong?</p>