I have two problems:
First, when I am trying to get data from this website it goes well within browser but when I send request using httpwebrequest in C# it responds with this message. In first attempt it may return data but if the send request again it returns this message.
Second, when I go to page-2 or click next to go to another page it generates numbers (in end) which is not consistent changes everytime I refresh browser. How can I get these numbers? For example: "=1559040099084" like this.
{ "message": "refresh" }
- HttpWebRequest request = (HttpWebRequest)HttpWebRequest.Create(URI);
- request.Headers.Add("IfModifiedSince", DateTime.Now.ToString());
- request.Method = "GET";
- string result = string.Empty;
- using (HttpWebResponse response = (HttpWebResponse)request.GetResponse())
- {
- Stream dataStream = response.GetResponseStream();
- StreamReader reader = new StreamReader(dataStream);
- result = reader.ReadToEnd();
- reader.Close();
- dataStream.Close();
- }
- Debug.Write(result);
https://www.rajalacamera.fi/tuotteet/objektiivit
https://www.rajalacamera.fi/alt_api/category/?category_id=29&p=2&product_list_order=position&product_list_dir=asc&_=1559040099084