Can i change this download func to use http service?

This a download function i have:
     //Downloads a file and calls the writeFile func
          private function downloadFile(url:String):void{
               var urlStream:URLStream = new URLStream();
               var request:URLRequest = new URLRequest(url);
               //var downloadFileName:String=getDownloadFilename(url);
               urlStream.addEventListener(Event.COMPLETE, writeFile);
               urlStream.addEventListener(IOErrorEvent.IO_ERROR , function (e:IOErrorEvent):void{
               urlStream.load(request);
               urlStream.addEventListener(IOErrorEvent.IO_ERROR, onIOError);
I need to change the URL request to send a user/name password in the header for authentication...i can do this with a httpservice...but not a url request
Can someone change the above code to use a http serivce? instead of a URLrequest/stream? Not sure how to do it

You can do the same with UrlRequest as well and for that you need to make use of UrlRequest headers in order to do the authentication
Check out this link...
http://stackoverflow.com/questions/509219/flex-3-how-to-support-http-authentication-urlreq uest
Thanks,
Bhasker

Similar Messages

  • I am using OSX 10.9.5 and Outlook Web App for emails. When I download an attachment it replaces the space in the file name with   - how can I change this?

    I am using OSX 10.9.5 and Outlook Web App for emails. When I download an attachment it replaces the space in the file name with %20  - how can I change this?

    Click on the below link :
    https://get.adobe.com/flashplayer/otherversions/
    Step 1: select Mac OS  X 10.6-`0.`0
    Step 2 : Safari and FIrefox
    Then click on " Download Now"  button.

  • I downloaded IOS 6 and using the apps movies , books and I-store I get connected to the USA store and not to the Dutch one like before. So i cannot update my purchaged apps. How can I change this ?

    I downloaded IOS 6 and using the apps movies , books and I-store I get connected to the USA store and not to the Dutch one like before. So i cannot update my purchaged apps. How can I change this ?

    Have you looked on all the pages of your iPod?  Have you looked in all your folders?  Have you you tried finding the apps using the iPod's search page.
    PS: Offering points in advance is a violation of there terms of service for this forum.  Perhaps it's why you have not received any other answers so far,

  • When I create a New Folder (on the desktop or in Finder), the system uses the Generic Document Icon instead of the Generic Folder Icon. How can I change this back?

    When I create a New Folder (on the desktop or in Finder), the system uses the Generic Document Icon instead of the Generic Folder Icon. How can I change this back?
    All of a sudden I noticed that most of the folders on my computer were no longer using the folder icon, but the generic document icon. I had to manually change back the icon being used by opening Get Info for each folder and copying and pasting the generic folder icon from some folders that remained unchanged. Now whenever I create a New Folder (right click -> "New Folder"), the icon that shows up is the generic document icon (white page with top right corner turned down). And I have to manually change it so it shows up as a folder in Finder or on my desktop. I don't know why or how this switch happened. All of the folders now on my computer look ok, but I need to change the default so when I create a New Folder it uses the correct icon.
    I have also Forced Relaunch of my Finder and rebooted the system. I downloaded Candybar but am not sure what will fix anything, so I haven't proceeded.
    Anyone know how I can do this? Thanks.

    Anyone?

  • HOW CAN I START DOWNLOADS AUTOMATICALLY? I DON'T NEED TOO SEE THE SAVE OR DISCARD BOX. THIS BUGS THE CRAP OUT OF ME. CAN I CHANGE THIS, OR ARE WE FORCED TO DO WHAT YOU THINK IS BEST? THANKS, KEITH D.

    HOW CAN I START DOWNLOADS AUTOMATICALLY? I DON'T NEED TOO SEE THE SAVE OR DISCARD BOX. THIS BUGS THE CRAP OUT OF ME. CAN I CHANGE THIS, OR ARE WE FORCED TO DO WHAT YOU THINK IS BEST? THANKS, KEITH D.

    Hey, Jeff...
    I don't know how I could have made my question any more clear -- so let me try approaching it the other way around, and refer back to your answer(s).
    You've been responding by saying that it's okay for me to remove the Creative Cloud versions of my software, but I don't have any Creative Cloud versions installed! I'm not talking about that at all, I'm talking about the software for Creative Cloud itself -- I don't use it, I don't need it, I don't want it, and all it does is nag me, telling me that there's updates for it (Creative Cloud). I have the full Adobe Creative Suite 6 Design Standard bought and paid for, I have no reason nor need to "rent" any later versions, I'm just talking about the Creative Cloud software itself that got installed on my system when I installed that suite of programs.
    Like I said, I don't use Creative Cloud at all -- all it does is "nag" me, and eat up space on my hard drive. When I go in my Windows Control Panel and look at my list of installed programs, there it is -- "Adobe Creative Suite" -- and it's listed separately from "Adobe Creative Suite 6 Design Standard" (of which I've only installed Photoshop, Acrobat and InDesign, basically, as those are the only programs I use at all at the moment). Can I just uninstall "Adobe Creative Suite" without it affecting "Adobe Creative Suite 6 Design Standard", i.e. my Photoshop, etc. will still work just fine, and I can still get updates and stuff? And by "updates" I don't mean get later versions of Photoshop, etc., I just mean any possible updates to the software that I do already have (that comes with Adobe Creative Suite 6 Design Standard).
    I hope that makes my question a little more clear?

  • My iPhone 4S appears to be using an old Apple ID.  How can I change this to my current one?

    My iPhone 4S appears to be using an old Apple ID and keeps asking for my sign in.  How can I change this to my current ID -this applied to iCloud only.

    Thanks for the response -
    Unfortunately - I can not use my Old Apple ID at all - Apple/Itunes is not recognizing it at all.  I thought about your last suggestion and the system is not accepting the old ID and password.  I believe this is because the old id (email address) is associated to a service (Verizon) that I no long have.  When I discontinued service with Verizon, their email address that I used as my Old apple ID become invalid.
    I am sure this scenario happens frequently - hopefully Apple can find a better solution in the future.
    Thanks,
        dr

  • 3 iphones in household.All use same apple ID.But all contacts get mixed between phones and facetime calls come in from other contacts.Ho can we change this so our phone information isn't visible to each other?

    3 iphones in household.All use same apple ID.But all contacts get mixed between phones and facetime calls come in from other contacts.How can we change this so our phone information isn't visible to each other?

    Use separate Apple IDs for each family member and use Family Sharing features of those things (if any) that you do want to share. https://www.apple.com/ios/whats-new/family-sharing/

  • When I right click on a link "Open link in new tab" since a few days, it "jumps over" the tab to the right and opens in the tab next to that. How can I change this back to opening in the tab next to the page from which I opened as it used to be?

    When I right click on a link "Open link in new tab" since a few days, it "jumps over" the tab to the right and opens in the tab next to that. How can I change this back to opening in the tab next to the page from which I opened as it used to be?

    Start Firefox in [[Safe Mode]] to check if one of the add-ons is causing the problem (switch to the DEFAULT theme: Tools > Add-ons > Themes).
    * Don't make any changes on the Safe mode start window.
    See:
    * [[Troubleshooting extensions and themes]]
    * [[Troubleshooting plugins]]
    If it does work in Safe-mode then disable all extensions and then try to find which is causing it by enabling one at a time until the problem reappears.
    * Use "Disable all add-ons" on the [[Safe mode]] start window to disable all extensions.
    * Close and restart Firefox after each change via "File > Exit" (Mac: "Firefox > Quit"; Linux: "File > Quit")

  • I am based in Russia, and I use a Russian cred card number. Hence my apple store page is in Russian language (which i dont speak). Can I change this into English language and if yes, how?

    I am based in Russia, and I use a Russian cred card number. Hence my apple store page is in Russian language (which i dont speak). Can I change this into English language and if yes, how?

    The only way I know is that you need a physical address and credit card of an English speaking country.

  • Since downloading ios8 to my I pad mini I am unable to sync movies, however I can sync them on my I phone 5s with same update? How can I change this?

    Since downloading ios8 to my I pad mini I am unable to sync movies, however I can sync them on my I phone 5s with same update? How can I change this?

    Thanks - that helped. But when I tried to sync all my photo folders to the I pad 2, I tunes would add some but not all of the ones that were marked to sync, end the sync, then the I pad 2 would hang with the wheel turning, saying it was still syncing photos, and it would not end and the remaining folders of photos never appeared. I finally had to sync and re-sync over and over by adding one folder of photos at a time, then another and another.

  • Using a garmin sat nav device, when planning a route on the mac it always defaults to the same far away location as the starting point. How can I change this?

    Whenever I start route planning using Garmin Connect, the map opens at the same distant location every time, by default. How can I change this and make it open at my own location?

    Hello Cgifford,
    Welcome to National Instruments Forums.
    To output your signal to the PFI lines,
    you can use external connectios between OUT0 and PFI lines. You can also use
    the backplane to do so by routing into the same RTSI line.
    1)
    On the SCOPE and FGEN, the name of the
    terminals are actually “PXI Trigger Line x/RTSIx” but on the 6602 you might
    need to route the signal using the property:
    You can also use the DAQmx route signal which perform the same opperation.
    2)
    This will depend on the frequency of
    your pulse train. If this is lower than about 10 ms, then you can probably
    place this on a loop and start and stop the acquisition every time. If the
    frequency is higher than this, you will have to use:
    -       Scripting on the FGEN side (read more)
    -       MultiRecord Fetch (more information in the scope help file
    section “Acquisition Functions Reading versus Fetching”).
    3)
    The short answer is yes. The longer one
    might depend on how tight you need the synchronization to be (us, ns, ps). For
    very tight synchronization, you should look into here.
    Message Edited by Yardov on 06-18-2007 03:14 PM
    Gerardo O.
    RF Systems Engineering
    National Instruments
    Attachments:
    property.JPG ‏7 KB

  • I have downloaded the 32 bit version of photoshop elements, when i needed the 64 bit, how can I change this?

    I have downloaded the 32 bit version of photoshop elements, when i needed the 64 bit, how can I change this?

    Emmag74878818 what version of Photoshop Elements are you trying to download?  Where did you download the 32-bit version from?

  • I have updated both my iphone 4G and my husbands 4G with the nAew 5 update but now have his contacts on my phone and everytime he downloads an app it goes on my phone.  How can I change this? Do I have to have two separate Apple ID's

    I have updated both my iphone 4G and my husbands 4G with the nAew 5 update but now have his contacts on my phone and everytime he downloads an app it goes on my phone.  How can I change this? Do I have to have two separate Apple ID's

    Try this
    http://support.apple.com/kb/ht1495
    Hope it helps.

  • Dear Friends...... I have an ipad 2 32gb with wifi and 3g enabled sim..... i bought it second hand .... and now if am going to download any games it is showing me an email id and asking for its password... please guide me how can i change this setting

    Dear Friends...... I have an ipad 2 32gb with wifi and 3g enabled sim..... i bought it second hand .... and now if am going to download any games it is showing me an email id and asking for its password... please guide me how can i change this setting to my email id and password

    Tap on the id in Settings > Store and log out of it and then login with your id. Any content already on the iPad will be tied to the previous owner's id and it can't be copied or transferred to your id - so it's probably best to do restore the iPad back to factory defaults and start as from new with it : Settings > General > Reset > Erase All Contents And Settings

  • I am using the dynamic signal analyzer.vi but this vi has the output as single precision. How can I change this to DBL precision?

    I am using the dynamic signal analyzer.vi but this vi has the output as single precision. How can I change this to DBL precision? If I change the representation from single to double in the AI buffer read.vi labview returns ilegal operation and crash. I have labview 5.1 on windows 95 and one AT-MIO16XE50 DAQ board.
    Thanks in advance
    Ricardo.

    Probably by changing the data type that lvdaq.dll expects to write to is causing the crash. I can't test this since I have only 6.1 installed now. In any case, since the daq card is only 16 bits, the single precision is probably adequate for AI Buffer Read. If you do need the greater precision later on, you should be able to change representation in any one of the upper level VIs.

Maybe you are looking for

  • Both Ichat & mail freeze up after migration

    Dear User, can you help me out? Last week I migrated data from an old Imac G5 to my new macbook pro. Since the migration i cannot get mail to work properly. Mail opens correctly but automatically quits when i try to click an e-mail (see attached erro

  • Constant Error While Setting Up Airport Express with Existing Network

    I just bought an Airport Express for use with printer and existing wireless network (two original Airport Extremes). I can't get past the error msg below*. The AE shows in Airport Utility. I click on that and then "Continue". A window appears asking

  • Writing dynamic value to a text file in Openscript

    How to write the dynamic values which i captured in a variable into a text file in openscript ? I searched throughout the user guide and i don't find any option for that. Please help, thanks in advance..

  • Sliding page interface - nav buttons

    Hello, I am creating a site for a client that involves a large movie clip with 9 different "pages" in a 3x3 grid. Each page is the same size as ths stage, so only one can be seen at a time. The use will click arrows to navigate up, down, left, or rig

  • Report in HR for see leave of employee

    Good Morning. There is a report that allows me to see the absences of employees who have to charge a person responsible for an organizational unit The Best Regards, Wilman