2
$\begingroup$

So as part of breaking down how to write a service connection I need to use URLFetch as opposed to URLRead. Unfortunately this is causing me some headaches as the former throws errors where the latter doesn't.

For instance:

In[23]:= URLFetch["https://api.stackexchange.com/2.2/search/advanced?\
site=mathematica.stackexchange.com&q=..."]

$CharacterEcoding::utf8

The byte sequence {139} could not be interpreted as a character in the UTF-8 character encoding.

In[26]:= "https://api.stackexchange.com/2.2/search/advanced?site=\
mathematica.stackexchange.com&q=..." // Import

Out[26]= "{\"items\":[],\"has_more\":false,\"quota_max\":300,\"quota_\
remaining\":260}"

How does one get around this?

$\endgroup$
1
  • $\begingroup$ It turns out this is exactly the issue encountered here. I'm gonna leave this question up just as a re-route, in case someone else encounters a similar issue. $\endgroup$
    – b3m2a1
    May 29 '17 at 5:45