View Full Version : HTTP GET Request
npala2001
01-25-2007, 10:13 PM
I have never written a HTTP request before. I have a file that I need to grab, but I have to use an HTTP request. I am not sure what format that I have to follow in order for the data to be displayed using HTML. I searched the forumn but could not find anything
nikkiH
01-25-2007, 11:14 PM
Why write your own?
I can't think of too many languages that don't already have such an object. Whatcha using?
npala2001
01-26-2007, 06:00 PM
I am using an HTML page and I want to display the information from the GET request.
GET /server/peer.cfm HTTP/1.1
Host: ir.shareholder.com
User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; QS 4.2.0.0; .NET CLR 1.1.4322; InfoPath.1; .NET CLR 2.0.50727)
Connection: close
I guess I am more confused where to place the GET request (i.e. header, above HTML tag)
nikkiH
01-26-2007, 08:18 PM
I am completely confused as to what you are trying to do here.
GET requests are not made with html.
Why is it you think you need to play with a GET request at all?
You have an html page, I assume.
Where is the file whose contents you are trying to display?
npala2001
01-26-2007, 10:56 PM
I was under the assumption I could include a GET request in my HTML page. The files are located on a third party vendors server and the web developer over there told me to just use a GET request. If you cant include a GET request in HTML. What can you use it with? Thanks for your response by the way
If you are just coding in HTML then a GET request is basically just a link.
GET /server/peer.cfm HTTP/1.1
Host: ir.shareholder.com
Is simply http://ir.shareholder.com/server/peer.cfm
But for more help you need to describe your situation in more detail.
npala2001
01-29-2007, 04:15 PM
what is the usual method for writing GET request. What language/method used?
Well *any* programming language can be used.
If you were coding in PHP, all you need to do is
echo file_get_contents("http://ir.shareholder.com/server/peer.cfm");
which will display the contents of the remote file in your browser (performing a GET request for you)
But for more help you need to describe your situation in more detail.
I want to see ten lines describing your problem in detail! :P
npala2001
01-30-2007, 12:14 AM
We have an external vendor that provides stock information. I contacted our IT group to talk about how we can extract that data from the (http://ir.shareholder.com/server/peer.cfm) URI. The guy just said you could use a HTTP GET request to extract the data. We have portlets on our homepage that display various information and I was wanting to include the content since its not located on our servers. I figured I could just do a include statement within an HTML document and that would do the trick, but that doesnt seem to be the case. Any ideas?
npala2001
01-30-2007, 12:34 AM
nevermind I just used an iframe to display the data - thanks for your help
vBulletin® v3.8.2, Copyright ©2000-2012, Jelsoft Enterprises Ltd.