Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > ASP.NET and ASP > ASP 3 Classic ASP Active Server Pages 3.0 > Classic ASP Professional
Password Reminder
| FAQ | Members List | Search | Today's Posts | Mark Forums Read
Classic ASP Professional For advanced coder questions in ASP 3. NOT for ASP.NET 1.0, 1.1, or 2.0.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Classic ASP Professional section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
DRM-free e-books 300x50
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old July 21st, 2016, 07:30 AM
Registered User
Points: 11, Level: 1
Points: 11, Level: 1 Points: 11, Level: 1 Points: 11, Level: 1
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
Join Date: Dec 2014
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default API request and response with classic asp


I need to make an API request to a remote server and get some value with the response.

It doesn't work for me.
I get this error:
The download of the specified resource has failed.

This is my code:

strURL = "https://secure5.test.com/cgi-bin/api-url.cgi"

postData=postData & "<?xml version='1.0' encoding='UTF-8'?>"
postData=postData & "<OrderData>"
postData=postData & " <supplier>xyz</supplier>"
postData=postData & " <PW>12345</PW>"
postData=postData & " <op>1</op>"
postData=postData & " <sum>15</sum>"
postData=postData & " <OrderID>11</OrderID>"
postData=postData & "</OrderData>"

Dim strRequest, strResult
set objXMLHTTP = Server.CreateObject("Msxml2.XMLHTTP.3.0")
objXMLHTTP.open "post", "" & strURL & "", False
objXMLHTTP.setRequestHeader "Content-Type", "text/xml; charset=utf-8"
objXMLHTTP.setRequestHeader "Content-Length", Len(strRequest)
objXMLHTTP.setRequestHeader "SOAPAction", strURL
strResult = objXMLHTTP.responseText
response.write "strResult:<br>" & strResult

I realy appriciate your help with it.


Reply With Quote

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
First SOAP Request with Classic ASP emmals Classic ASP XML 0 September 22nd, 2014 03:42 AM
Convert classic ASP - Web API code to ASP.NET melvik ASP.NET 3.5 Professionals 0 February 24th, 2012 03:02 PM
Asp .Net 2.0 request/response timeout problem VijayT .NET Framework 2.0 5 February 5th, 2007 01:26 PM
how to send https request in classic asp johndoewn Classic ASP Professional 1 March 25th, 2006 12:37 AM

All times are GMT -4. The time now is 05:42 PM.

Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.