Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 282
  • Last Modified:

How can I make an HTTP request from WITHIN an ASP script

This may seem an odd thing to want to do, but it is possible to make an HTTP POST or GET to another web server from within an ASP script, then recieve & parse the result within ASP?

The actual requirement is to upload two files to a remote server via HTTP, then to download and parse (within the script) the file that is returned.  The contents of this file will be used within the script to produce the final output to the client.

Does anyone know of any way this can be achieved?  Ideally, with a code sample.

Thanks in advance
0
DrBeaker
Asked:
DrBeaker
  • 4
  • 3
1 Solution
 
a_twixt_in_the_taleCommented:
user Server.CreateObject("Microsoft.XMLHTTP")
0
 
DrBeakerAuthor Commented:
Could you elaborate and ideally provide a code sample
0
 
a_twixt_in_the_taleCommented:
<%
      Set xml = Server.CreateObject("Microsoft.XMLHTTP")
      xml.Open "GET", "http://www.google.com/", False
      xml.Send
      response.write(xml.responseText)
%>
0
VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

 
DrBeakerAuthor Commented:
:) OK

Actually I have been searching google & MS re this since your first (very helpful) post with mixed results.  Where is this component documented?  I've been able to find references to the docs but no actual docs.

How would I upload & download files?

Sorry to me so demanding, but ASP is very new to me.

0
 
a_twixt_in_the_taleCommented:
> Where is this component documented?
Dunno exactly. its part of Microsoft's XML parser. should b there in C:\Program Files\MSXML 4.0\doc\xmlsdk.chm sumwhere or msxml 3.0 if u use that

try http://www.4guysfromrolla.com/webtech/110100-1.shtml should b good

> How would I upload & download files?
Getting Binary Data is there in http://www.4guysfromrolla.com/webtech/110100-1.shtml
Uploading files u hv loadsa cmpts, i hvnt used any though, so any of my suggestions on that would be all hot air. :)

:)
Don
0
 
DrBeakerAuthor Commented:
Thanks for the help.  I've doubled the points for a very prompt, helpful and interactive response.

Cheers Don.

Dave
0
 
a_twixt_in_the_taleCommented:
Thnx!
0

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

  • 4
  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now