danieledellafiore

EchoNest Catalog Create

Dec 10th, 2011
54
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.49 KB | None | 0 0
  1.         PostMethod post = new PostMethod("http://developer.echonest.com/api/v4/catalog/create");
  2.         Part[] parts = { new StringPart("api_key", apiKey), new StringPart("type", "artist"),
  3.               new StringPart("name", "test_artist_catalog") };
  4.         post.addRequestHeader("Content-Type", "multipart/form-data");
  5.         MultipartRequestEntity mpEntity = new MultipartRequestEntity(parts, post.getParams());
  6.         post.setRequestEntity(mpEntity);
  7.         HttpClient client = new HttpClient();
  8.         client.executeMethod(post);
  9.  
Advertisement
Add Comment
Please, Sign In to add comment