fixing the NSURLDatatask partial response issue

It looks like using nsdatatask to get a JSON response may not be very
reliable. Sometimes I am getting a partial response. I will try to make
this a downloadtask.