Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- curl -i 'http://developer.echonest.com/api/v4/artist/profile?api_key=FILDTEOIK2HBORODV&name=weezer'
- HTTP/1.1 200 OK
- Content-Length: 135
- X-RateLimit-Limit: 120
- X-RateLimit-Remaining: 62
- X-RateLimit-Used: 58
- string baseurl = "http://developer.echonest.com/api/v4/artist/profile?api_key=GM5C44WAJ08RK7HSF&name=weezer";
- HttpWebRequest request = (HttpWebRequest)WebRequest.Create(baseurl);
- request.Method = "POST";
- request.Accept = "application/json";
- request.UserAgent = "curl/7.37.0";
- request.ContentType = "application/x-www-form-urlencoded";
- using (var streamWriter = new StreamWriter(request.GetRequestStream()))
- {
- string data = "browser=Win7x64-C1|Chrome32|1024x768&url=http://www.google.com";
- streamWriter.Write(data);
- }
- var response = request.GetResponse();
- string text;
- using (var sr = new StreamReader(response.GetResponseStream()))
- {
- text = sr.ReadToEnd();
- Console.WriteLine(text);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement