Microsoft HomeproductssearchsupportshopWrite Us   Microsoft Home
Magazine
 |  Community
 |  Workshop
 |  Tools & Samples
 |  Training
 |  Site Info

Networking, Protocols, & Data Formats

HTTP Request Sample

Download sample

Description

This sample demonstrates how to create and submit HTTP requests. Sample requests the default HTML document from the server and then displays it along with the HTTP transaction headers. This sample also allows access to password protected pages. It checks for HTTP server response code and if it is "401 Access Denied" it asks password and user name and then resubmits the request

More Details

This sample features: SSL/PCT support NTLM Authentication (when IE 3.0 or above is installed) Basic Authentication Generating standard user name/password UI to get user credentials. Getting user name and password without UI getting any document of any MIME type translation of Internet error codes to the extended error messeges ability to save remote object to a local file (when no local file specify output goes to STDOUT).

Browser/Platform Compatibility

This sample is supported on Win32 platforms.

Usage

headdump.exe -h host [-o object] [-p proxy] [-u] [-s] [-?] [-f file] -h host is a HTTP server such as www.server.com -p proxy is optional proxy, in form: http://proxy:80 -o object is optional document to GET, in form: /foobar.htm -u use this flag to bring user name and password UI (optional) -f save remote object as local file (optional) -? get help -s use SSL (optional)

Other

To get help on command line parameters: C:> headdump.exe -? Note that HeadDump can also invoke ISAPI dll or CGI like this: C:> headdump.exe -s www.server.name -o /scripts/myisapi.dll Since sample generates large output, you may want to pipe to more: C:> headdump.exe -s www.server.name -o /scripts/myisapi.dll | more To save remote HTML object as file: C:> headdump.exe -s www.server.name -o /exe_files/foo.exe -f foo.exe

© 1998 Microsoft Corporation. All rights reserved. Terms of use.

 

Magazine Home
Ask Jane
DHTML Dude
Extreme XML
For Starters
More or Hess
Servin' It Up
Site Lights
Web Men Talking
Member Community Home
Benefits: Freebies & Discounts
Benefits: Promote Your Site
Benefits: Connect with Your Peers
Benefits at a Glance
Online Special-Interest Groups
Your Membership
SBN Stores
Join Now
Workshop Home
Essentials
Content & Component Delivery
Component Development
Data Access & Databases
Design
DHTML, HTML & CSS
Extensible Markup Language (XML)
Languages & Development Tools
Messaging & Collaboration
Networking, Protocols & Data Formats
Reusing Browser Technology
Security & Cryptography
Server Technologies
Streaming & Interactive Media
Web Content Management
Workshop Index
Tools & Samples Home
Tools
Samples, Headers, Libs
Images
Sounds
Style Sheets
Web Fonts
Training Home
SBN Live Seminars
SBN Live Chats
Courses
Peer Support
CD-ROM Training
Books & Training Kits
Certification
SBN Home
New to SBN?
What's New on SBN
Site Map
Site Search
Glossary
Write Us
About This Site