Get image from a server by Ajax

0

I have the following code:

$.ajax({
     url: urls,
     type: "GET",
     beforeSend: function(req) {
      req.setRequestHeader("Accept", "text/plain");
    }
  }).done(function(data, textStatus, jqXHR ) {
    console.log(data);
  });

I do a get to an image on a server and when I receive the answer I get more or less the following (of course bigger but I will not put everything, just a fragment):

 �w�9��c�^�u�l�                    
asked by Maritza Sánchez 19.12.2018 в 01:03
source

0 answers