I'm trying to use an api to get information about movies, i'm useing this api an it actualy works.
The only thing is that is way to slow and i wonderd if there is an faster way to do it? I must say, this is rather new for me. Here is somme code.
public string Connect()
{
WebRequest request = WebRequest.Create(this.url);
request.ContentType = "application/json; charset=utf-8";
//this is slowing me down
WebResponse response = (HttpWebResponse)request.GetResponse();
using (StreamReader sr = new StreamReader(response.GetResponseStream()))
{
jsonString = sr.ReadToEnd();
}
return jsonString;
}
public static string GetFilmInfo(string titel)
{
MakeCon checkVat = new MakeCon("http://www.imdbapi.com/?i=&t=red" + titel + "/");
JsonSerializer serializer = new JsonSerializer();
string jsonString = checkVat.Connect();
return JsonConvert.DeserializeObject<string>(jsonString);
}