login about faq

Is there a function to download a URL to a byte array instead of directly to disk?

asked Jun 17 '15 at 17:03

chilkat's gravatar image

chilkat ♦♦

Yes, to download to an in-memory byte array, call the Http.QuickGetObj method. For example:

Chilkat.HttpResponse resp = http.QuickGetObj("http://www.chilkatsoft.com/download/");
(Please note: The above URL is valid at the time of this posting, but may not be valid in the future.)

The response object has a Body property. It is a binary byte array. For example, in C# it is this:

public byte[] Body {get; }
In the ActiveX it is a Variant containing a byte array. In C++, Java, Python, etc. it is a CkByteData. In Objective-C it is a
@property (nonatomic, readonly, copy) NSData *Body; 
Etc. etc. etc...


answered Jun 17 '15 at 17:09

chilkat's gravatar image

chilkat ♦♦

Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here



Answers and Comments

Markdown Basics

  • *italic* or __italic__
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported



Asked: Jun 17 '15 at 17:03

Seen: 1,594 times

Last updated: Jun 17 '15 at 17:09

powered by OSQA