Rex Swain's HTTP Viewer
See exactly what an HTTP request returns to your browser
Basically, just enter a URL and then click the Submit button. The fine print follows...
- URL: Must begin with http:// or https://.
- Request Type:
- GET, the default, shows both the header and content.
- HEAD shows only the header -- a good choice if that's all you care about, or if you anticipate a very large amount of content.
- TRACE is of limited interest -- it just reiterates the request.
- Display Format:
- Auto-Detect, the default, looks at the Content-Type line in the header and chooses what it thinks is the appropriate display type.
- Text forces text display, which is suitable for HTML files.
- Hex forces hexadecimal display, which would be more appropriate for image files.
- User-Agent: This is optional. Sometimes a remote server may return a different response depending on the client or browser that initiated the request. We default this to the user-agent that your current browser uses.
- Referer: (Yes, this is misspelled -- it should be "referrer". See origin of the term referer.) Also optional. Tells the server the URL from which the requested URL was obtained. The server may respond differently to a request depending on the referring resource. It also allows a server to generate lists of back-links to resources for interest, logging, optimized caching, etc. It also allows obsolete or mistyped links to be traced for maintenance. The referer field should NOT be sent if the requested URL was obtained from a source that does not have its own URL, such as input from the user keyboard.
- Auto-Follow Location: If the server returns a Location: line in the HTTP header, it instructs your browser to "forward" or "redirect" itself to that new location. If this option is selected, HttpView will automatically continue to query such new locations (up to a maximum of 4 times).
What You'll SeeThe Header section shows stuff that your browser would receive but not display. For example:
- Last-Modified: tells when the file was most recently modified
- Set-Cookie: asks your browser to create a cookie
- Location: asks your browser to go to another URL
The Content section shows the data that your browser would display for you -- somewhat like using your browser's View Source feature.
In a text display, non-text characters are shown as follows:
- (LF) = Linefeed, aka Newline (hex 0A)
- (CR) = Carriage Return (hex 0D)
- (HT) = Horizontal Tab (hex 09)
- (00) = Hexadecimal 00
- Try entering http://www.amazon.com as the URL in the form above, and select the auto-follow-location option. You'll see that Amazon redirects you twice while setting various cookies.
Note that if you aim your browser at http://www.amazon.com, the exchange might be somewhat different. If any amazon.com cookie values were already set on your system, your browser would send them back, and Amazon would respond accordingly (greeting you by name, for instance).
Source CodeMy HTTP Viewer is useful as is, and demonstrates the quality of work that consulting clients can expect from me. Sorry, but the source code is not available -- I give away a lot of material on my site, but not everything!
Other ToolsSee my home page for other summaries and demos: APL, REXX, XEDIT, KEDIT, Perl, HTML, RGB Colors, HTTP Cookies, Email Forms, CGI Environment Variables, Server Side Includes, etc...
You are visitor since 24 October 1999
Last updated 22 May 2019
Copyright © 1999-2019 Rex Swain
E-mail firstname.lastname@example.org, Web http://www.rexswain.com
Thanks to 3wVentures for supporting this site