TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Guest User
Tech Writer
20
3.4k
Website responding with Error message in HttpWebRequest
May 29 2019 8:51 AM
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
Reply
Answers (
7
)
how read doc file comment and specify
Taking Photo From a Web Cam and Saving to Folder & DB