P
P
Piloowar2014-06-19 14:02:39
C++ / C#
Piloowar, 2014-06-19 14:02:39

Is it possible to download a file (image) via xNet and save it?

url = "http://yastatic.net/morda-logo/i/ya-logo.png";
HttpRequest wr = new HttpRequest();
HttpResponse response = wr.Get(url);
Stream responseStream = response.ToStream();

Answer the question

In order to leave comments, you need to log in

1 answer(s)
M
MIsternik, 2014-06-21
@Piloowar

Then create a FileStream and write the contents of the responseStream into it.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question