Solved

HTTP Post a Base64 encrpted file

Posted on 2006-12-01
3
236 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

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

This article shows how to create and access 2-dimensional arrays in JavaScript.  It includes a tutorial in case you are just trying to "get your head wrapped around" the concept and we'll also look at some useful tips for more advanced programmers. …
Introduction HTML checkboxes provide the perfect way for a web developer to receive client input when the client's options might be none, one or many.  But the PHP code for processing the checkboxes can be confusing at first.  What if a checkbox is…
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…

758 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

18 Experts available now in Live!

Get 1:1 Help Now