473,396 Members | 1,967 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

HttpWebResponse getting attributes

How can I get all the attributes of an HttpWebResponse? I do a request
to this site: http://pipa.inov.pt/cgi-bin/camera but originaly it comes
with a PAGE attribute that gives me the time in clock ticks of the
captured image like this:
http://pipa.inov.pt/cgi-bin/camera?PAGE=114349432

You can try it: http://pipa.inov.pt/ and it will give a URL like the
above with the PAGE attribute but my request "ends" on ".../camera".
How can I get the PAGE attribute... in the header? How can I do this?

Any lights will be appreciated,
Nuno Magalhaes.

Nov 17 '05 #1
5 1771
Here's the sample code:
-------------------------------------------------------------
private Image GetImage(string sURL)
{
Stream stream=null;
//Prepare web request
HttpWebRequest wReq=(HttpWebRequest)WebRequest.Create(sURL);
//Get web response
HttpWebResponse wRes=(HttpWebResponse)wReq.GetResponse();
stream=wRes.GetResponseStream();
return Image.FromStream(stream);
}
-------------------------------------------------------------------

I want the property page so that I can calculate the frames per
seconds.

Thank you,
Nuno Magalhaes.

Nov 17 '05 #2
Hi,

A webresponse do not have any GET attributes, only the WebRequest have
them.

Most probably the page you get will have a link (which in turn may become
the next webrequest ) with the correct GET attributes.

cheers,

--
Ignacio Machin,
ignacio.machin AT dot.state.fl.us
Florida Department Of Transportation

"Nuno Magalhaes" <nu************@hotmail.com> wrote in message
news:11**********************@g14g2000cwa.googlegr oups.com...
How can I get all the attributes of an HttpWebResponse? I do a request
to this site: http://pipa.inov.pt/cgi-bin/camera but originaly it comes
with a PAGE attribute that gives me the time in clock ticks of the
captured image like this:
http://pipa.inov.pt/cgi-bin/camera?PAGE=114349432

You can try it: http://pipa.inov.pt/ and it will give a URL like the
above with the PAGE attribute but my request "ends" on ".../camera".
How can I get the PAGE attribute... in the header? How can I do this?

Any lights will be appreciated,
Nuno Magalhaes.

Nov 17 '05 #3
Thank you for your respose. By the way is it possible to select a new
host IP from a specific adapter and not using the default adapter? In
other words, how can I use WebRequest and WebResponse using a specific
IP from an adapter that is not the default adapter (and without messing
with low level sockets).
Ignacio Machin ( .NET/ C# MVP ) wrote:
Hi,

A webresponse do not have any GET attributes, only the WebRequest have
them.

Most probably the page you get will have a link (which in turn may become
the next webrequest ) with the correct GET attributes.

cheers,

--
Ignacio Machin,
ignacio.machin AT dot.state.fl.us
Florida Department Of Transportation

"Nuno Magalhaes" <nu************@hotmail.com> wrote in message
news:11**********************@g14g2000cwa.googlegr oups.com...
How can I get all the attributes of an HttpWebResponse? I do a request
to this site: http://pipa.inov.pt/cgi-bin/camera but originaly it comes
with a PAGE attribute that gives me the time in clock ticks of the
captured image like this:
http://pipa.inov.pt/cgi-bin/camera?PAGE=114349432

You can try it: http://pipa.inov.pt/ and it will give a URL like the
above with the PAGE attribute but my request "ends" on ".../camera".
How can I get the PAGE attribute... in the header? How can I do this?

Any lights will be appreciated,
Nuno Magalhaes.


Nov 17 '05 #4
Another question by the way. Is it possible with WebRequest and
WebResponse to mount a server... in other words again, is it possible
to use an application as proxy using only the interfaces described
above (without going to sockets or we have to serialize the image and
send it by sockets)?

Thank you,
Nuno Magalhaes.
Ignacio Machin ( .NET/ C# MVP ) wrote:
Hi,

A webresponse do not have any GET attributes, only the WebRequest have
them.

Most probably the page you get will have a link (which in turn may become
the next webrequest ) with the correct GET attributes.

cheers,

--
Ignacio Machin,
ignacio.machin AT dot.state.fl.us
Florida Department Of Transportation

"Nuno Magalhaes" <nu************@hotmail.com> wrote in message
news:11**********************@g14g2000cwa.googlegr oups.com...
How can I get all the attributes of an HttpWebResponse? I do a request
to this site: http://pipa.inov.pt/cgi-bin/camera but originaly it comes
with a PAGE attribute that gives me the time in clock ticks of the
captured image like this:
http://pipa.inov.pt/cgi-bin/camera?PAGE=114349432

You can try it: http://pipa.inov.pt/ and it will give a URL like the
above with the PAGE attribute but my request "ends" on ".../camera".
How can I get the PAGE attribute... in the header? How can I do this?

Any lights will be appreciated,
Nuno Magalhaes.


Nov 17 '05 #5
Hi,

Not sure, but I'm inclined to NO.

why you want to do that? routing is something done at lower level. you do
not have control over it from .net

cheers,

--
Ignacio Machin,
ignacio.machin AT dot.state.fl.us
Florida Department Of Transportation

"Nuno Magalhaes" <nu************@hotmail.com> wrote in message
news:11**********************@g14g2000cwa.googlegr oups.com...
Thank you for your respose. By the way is it possible to select a new
host IP from a specific adapter and not using the default adapter? In
other words, how can I use WebRequest and WebResponse using a specific
IP from an adapter that is not the default adapter (and without messing
with low level sockets).
Ignacio Machin ( .NET/ C# MVP ) wrote:
Hi,

A webresponse do not have any GET attributes, only the WebRequest have
them.

Most probably the page you get will have a link (which in turn may become
the next webrequest ) with the correct GET attributes.

cheers,

--
Ignacio Machin,
ignacio.machin AT dot.state.fl.us
Florida Department Of Transportation

"Nuno Magalhaes" <nu************@hotmail.com> wrote in message
news:11**********************@g14g2000cwa.googlegr oups.com...
> How can I get all the attributes of an HttpWebResponse? I do a request
> to this site: http://pipa.inov.pt/cgi-bin/camera but originaly it comes
> with a PAGE attribute that gives me the time in clock ticks of the
> captured image like this:
> http://pipa.inov.pt/cgi-bin/camera?PAGE=114349432
>
> You can try it: http://pipa.inov.pt/ and it will give a URL like the
> above with the PAGE attribute but my request "ends" on ".../camera".
> How can I get the PAGE attribute... in the header? How can I do this?
>
> Any lights will be appreciated,
> Nuno Magalhaes.
>

Nov 17 '05 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Satinderpal Singh | last post by:
Hi everyone, We are using HttpWebRequest to create a request to a URI, which requires us to login first. In order to process all the transactions, first we have to login and get the cookie value...
0
by: hlabbott | last post by:
Hi I'm having a problem displaying attachments correctly. I have messages with attachments stored on Exchange2000 and want to be able to click a hyperlink in my project like in OWA and see an...
2
by: Dunc | last post by:
Hi, I've got an HttpWebResponse object, all working fine. I'm getting the underlying stream and currently writing it to a file using the ReadToEnd() method. All happy. I want to do a bit of...
13
by: Jason Manfield | last post by:
For some URLs (e.g.http://v3.espacenet.com/origdoc?DB=EPODOC&IDX=WO2005028634&F=0&QPN=WO2005028634), the content length for the HttpWebResponse I get with request.GetResponse in empty. The...
1
by: Satinderpal Singh | last post by:
Hi everyone, We are using HttpWebRequest to create a request to a URI, which requires us to login first. In order to process all the transactions, first we have to login and get the cookie value...
1
by: Brent | last post by:
I thought I was doing a simple thing, here -- asking a server for a text document, getting the first 150 lines, and then returning the lines. But I keep getting timeout errors: "Exception...
2
by: STEVE.KING | last post by:
Greetings: I need to download an executable and some other binary files (a C++ DLL) from a virtual directory in my WinForms application. No-Touch Deployment manages my .NET code fine but...
2
by: ss | last post by:
Hi, I would like to know like How do I load the XML Response which I got from HttpWebResponse? What I am doing, I will just put for your perusal; Dim hwrRequest As HttpWebRequest =...
1
by: twomster | last post by:
Hi, I am using the above object to different POST and GET request. Basically I am downloading a file. I want to download about 10 different files. However I want to be able to close the...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.