Something went wrong. Try again later

yannicxyz

This user has not updated recently.

2 0 0 0
Forum Posts Wiki Points Following Followers

yannicxyz's forum posts

Avatar image for yannicxyz
yannicxyz

2

Forum Posts

0

Wiki Points

0

Followers

Reviews: 0

User Lists: 0

Hello everyone.

I'm learning how to use the API right now and I ran into a problem. My code looks like this so far:

String gbURL = "http://www.giantbomb.com/api/search/?api_key=THIS-IS-WHERE-MY-API-KEY-IS&format=json&query='sonic'&resources=game";
HttpURLConnection urlConnection = null; URL url = new URL(gbURL); 
urlConnection = (HttpURLConnection) url.openConnection();
urlConnection.setRequestMethod("GET");
urlConnection.connect();

BufferedReader br = new BufferedReader(new InputStreamReader(url.openStream()));
StringBuilder sb = new StringBuilder();
String line;
while ((line = br.readLine()) != null)
{
sb.append(line + "\n");
}
br.close();
String jsonString = sb.toString();
System.out.println("JSON: " + jsonString);






However, as a result, I always get the 101 status code. As far as I know this means "object not found". But there should definitely be results for "sonic", right?