ASP
  Home arrow ASP arrow Page 4 - The Power of the XMLHTTP Library
Dev Articles Forums 
ADO.NET  
Apache  
ASP  
ASP.NET  
C#  
C++  
ColdFusion  
COM/COM+  
Delphi-Kylix  
Design Usability  
Development Cycles  
DHTML  
Embedded Tools  
Flash  
Graphic Design  
HTML  
IIS  
Interviews  
Java  
JavaScript  
MySQL  
Oracle  
Photoshop  
PHP  
Reviews  
Ruby-on-Rails  
SQL  
SQL Server  
Style Sheets  
VB.Net  
Visual Basic  
Web Authoring  
Web Services  
Web Standards  
XML  
Dedicated Servers  
Actuate Whitepapers 
Moblin 
IBM® developerWorks 
Sun Developer Network 
Weekly Newsletter
 
Developer Updates  
Free Website Content 
 RSS  Articles
 RSS  Forums
 RSS  All Feeds
Write For Us Get Paid 
Request Media Kit
Contact Us 
Site Map 
Privacy Policy 
Support 
 USERNAME
 
 PASSWORD
 
 
  >>> SIGN UP!  
  Lost Password? 
ASP

The Power of the XMLHTTP Library
By: Mitchell Harper
  • Search For More Articles!
  • Disclaimer
  • Author Terms
  • Rating: 5 stars5 stars5 stars5 stars5 stars / 54
    2001-12-18

    Table of Contents:
  • The Power of the XMLHTTP Library
  • XMLHTTP in a nutshell
  • Processing the request on the remote server
  • The XMLHTTP document headers
  • Conclusion

  • Rate this Article: Poor Best 
      ADD THIS ARTICLE TO:
      Del.ici.ous Digg
      Blink Simpy
      Google Spurl
      Y! MyWeb Furl
    Email Me Similar Content When Posted
    Add Developer Shed Article Feed To Your Site
    Email Article To Friend
    Print Version Of Article
    PDF Version Of Article
     
     
    ADVERTISEMENT

    Stay one step ahead of the competition. Evaluate and give feedback on some of the hottest web development tools on the market today. Make your opinion heard! Click Here

    The Power of the XMLHTTP Library - The XMLHTTP document headers


    (Page 4 of 5 )

    Along with your response from the remote server, the XMLHTTP library also returns a number of HTTP headers. These headers can be accessed using the GetAllResponseHeaders method of the XMLHTTP library, as shown below:

    Response.Write ObjXMLHTTP.GetAllResponseHeaders

    This would cause our XMLHTTP object to send all of its headers directly to the browser. On my Windows 2000 server, the headers looked like this:

    Server: Microsoft-IIS/5.0

    Date: Tue, 18 Dec 2001 00:06:04 GMT

    Connection: keep-alive

    Content-Length: 8

    Content-Type: text/html

    Cache-control: private

    These headers can come in handy if you’re trying to debug a problem with the remote servers response to your XMLHTTP request. The Content-Length variable contains the number of characters returned from the request. Keep in mind though, that even if you request a non-existent document, the Content-Length variable will still contain the length of the error message generated by the remote web server.

    If we want to get the details of each individual header variable, we can use the GetResponseHeader method. To retrieve the Content-Length, we would use it like this:

    Response.Write objXMLHTTP.GetResponseHeader("Content-Length")

    Remember that you can also use the Response.AddHeader method to add your own headers to the servers’ response. These could come in handy if you’re trying to debug database connections on the remote server, for example.

    More ASP Articles
    More By Mitchell Harper


     

    ASP ARTICLES

    - Central Scoreboard with Flash and ASP
    - Calorie Counter Using WAP and ASP
    - Creating PGP-Encrypted E-Mails Using ASP
    - Be My Guest in ASP
    - Session Replacement in ASP
    - Securing ASP Data Access Credentials Using t...
    - The Not So Ordinary Address Book
    - Adding and Displaying Data Easily via ASP an...
    - Sending Email From a Form in ASP
    - Adding Member Services in ASP
    - Removing Unconfirmed Members
    - Trapping HTTP 500.100 - Internal Server Error
    - So Many Rows, So Little Time! - Case Study
    - XDO: An XML Engine Class for Classic ASP
    - Credit Card Fraud Prevention Using ASP and C...







    © 2003-2008 by Developer Shed. All rights reserved. DS Cluster 1 hosted by Hostway