locked
How to set Header when restoring Background Downloads RRS feed

  • Question

  • Sometime ago I've made the same question on Stackoverflow, but the answer wasn't so satisfactory.

    The question is:

    'm trying to make some downloads using cookie authentication doing:

    var downloader = new BackgroundDownloader();

    downloader.SetRequestHeader("Cookie", "JSESSIONID=" + App.LoginGateway.JSESSIONID);

    downloader.SetRequestHeader("Cookie", "JSESSIONID=" + App.LoginGateway.JSESSIONID);

    Until here everything works perfectly, the problem begins when I try to restore my downloads and my JSESSIONID is expired

    IReadOnlyList<DownloadOperation> downloads = null;

    downloads = await BackgroundDownloader.GetCurrentDownloadsAsync();

    I tried to find where could I set the request Header again but I was not capable. If I create a new BackgroundDownloader where could I set it for my download Operation?? Some Help is very appreciated


    Tuesday, October 29, 2013 2:15 PM

Answers

  • In what way was your previous answer unsatisfactory? You will get better answers if you explain what you have already done and how that was insufficient. Including a link to your previous question would help.

    That said, you cannot modify the existing BackgroundOperation. You'd need to cancel and start a new one to change the properties.

    --Rob

    • Marked as answer by Victor Laerte Tuesday, October 29, 2013 9:26 PM
    Tuesday, October 29, 2013 2:43 PM
    Moderator

All replies

  • In what way was your previous answer unsatisfactory? You will get better answers if you explain what you have already done and how that was insufficient. Including a link to your previous question would help.

    That said, you cannot modify the existing BackgroundOperation. You'd need to cancel and start a new one to change the properties.

    --Rob

    • Marked as answer by Victor Laerte Tuesday, October 29, 2013 9:26 PM
    Tuesday, October 29, 2013 2:43 PM
    Moderator
  • In what way was your previous answer unsatisfactory? You will get better answers if you explain what you have already done and how that was insufficient. Including a link to your previous question would help.

    That said, you cannot modify the existing BackgroundOperation. You'd need to cancel and start a new one to change the properties.

    --Rob

    I tried to post a link, but couldn't. (No permission)

    It was unsatisfactory because no one official link was given, so I didn't know if it was right.

    Really I can't modify?? It's quite disappointing... It's so simple thing...

    Tuesday, October 29, 2013 4:33 PM