Solved

HTTP Post a Base64 encrpted file

Posted on 2006-12-01
3
246 Views
Last Modified: 2008-02-01
I need to post a base64 encrypted file using Javascript or VBScript.  Is this the correct syntax?  Will this only work for XML formats or will this work for any format?  

   Response.Buffer = True
    Dim objXMLHTTP, xml
    Dim xmlHttp
    Response.Buffer = True
    dim poststring
    poststring="data=" & Base64Data
    Set xmlHttp = CreateObject("Msxml2.XMLHTTP")    'create object
    On Error Resume Next               'error handling
    xmlHttp.Open "POST", "http://xxxxx.xxxx.net/comcalc1/bi/", False

    xmlHttp.setRequestHeader "Content-Type", "application/x-www-form-urlencoded"
    xmlHttp.Send poststring      'send HTTP request to the server
    Set xmlHttp = nothing      'free the object
0
Comment
Question by:Hojoformo
3 Comments
 
LVL 7

Expert Comment

by:vbandaru
ID: 18056566
The above code is certainly not javascript. Where did you get it from. Do you want to do the post from the client side?
0
 
LVL 2

Expert Comment

by:score_under
ID: 18057266
This is a vbscript document, not javascript.
0
 
LVL 51

Accepted Solution

by:
ahoffmann earned 500 total points
ID: 18057425
>  I need to post a base64 encrypted file ..
you need to read the file first, convert to base64 and then post it
or you need to use multipart/form-data and set the enctype to base64 for the variable of your file
0

Featured Post

Secure Your Active Directory - April 20, 2017

Active Directory plays a critical role in your company’s IT infrastructure and keeping it secure in today’s hacker-infested world is a must.
Microsoft published 300+ pages of guidance, but who has the time, money, and resources to implement? Register now to find an easier way.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Avoid defining the variables in the global scope; trying to define them in a local function scope. Because:   • Look-up is performed every time a variable is accessed.   • Variables are resolved backwards from most specific to least specific scope…
JavaScript can be used in a browser to change parts of a webpage dynamically. It begins with the following pattern: If condition W is true, do thing X to target Y after event Z. Below are some tips and tricks to help you get started with JavaScript …
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…

713 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