What is wrong with this http post script

Posted on 2006-04-12
Last Modified: 2012-06-27
All i get as a response is ?????????????????????????????????? a whole bunch of question marks

according to my pathetic understanding of this, to get the reply from the server i use
ResultBytes = XMLHTTP.responseBody
response.write ResultBytes
but all i get is the question marks from the fedex server.

     dim xmlhttp
     set xmlhttp = server.Createobject("MSXML2.ServerXMLHTTP")
     xmlhttp.Open "POST","",false
  set xmlDoc = Server.CreateObject("Msxml2.DOMDocument")
xmlDoc.async = false

XMLHTTP.setRequestHeader "Referer","ABC LTD."
XMLHTTP.setRequestHeader "Host", ""
XMLHTTP.setRequestHeader "Accept","image/gif, image/jpeg, image/pjpeg,text/plain, text/html, */*"
XMLHTTP.setRequestHeader "Content-Type","image/gif"
XMLHTTP.setRequestHeader "Content-Length", Len(xmldoc.xml)

     xmlhttp.send xmldoc.xml
    ResultBytes = XMLHTTP.responseBody
response.write ResultBytes
             Set xmlhttp = nothing
Question by:Ricky11
    LVL 49

    Accepted Solution

    XMLHTTP.setRequestHeader "Content-Type","image/gif"
    xmlhttp.setRequestHeader "Content-Type","text/xml"


    Author Comment

    same response.....

    this to be exact

    LVL 49

    Expert Comment

    My ASP isn't that great, but could it be that the respnse is in unicode?

    LVL 60

    Assisted Solution

    by:Geert Bormans
    Hi Ricky11,
    >     ResultBytes = XMLHTTP.responseBody

    try ResultBytes = XMLHTTP.responseXML
    and threat it as text

    my 2cts


    Author Comment

    tried everthing... talking to fedex now... still doesn't work

    anyway will close this...

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    Free Trending Threat Insights Every Day

    Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

    Suggested Solutions

    The Client Need Led Us to RSS I recently had an investment company ask me how they might notify their constituents about their newsworthy publications.  Probably you would think "Facebook" or "Twitter" but this is an interesting client.  Their cons…
    Many times as a report developer I've been asked to display normalized data such as three rows with values Jack, Joe, and Bob as a single comma-separated string such as 'Jack, Joe, Bob', and vice versa.  Here's how to do it. 
    Need more eyes on your posted question? Go ahead and follow the quick steps in this video to learn how to Request Attention to your question. *Log into your Experts Exchange account *Find the question you want to Request Attention for *Go to the e…
    Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.

    761 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    8 Experts available now in Live!

    Get 1:1 Help Now