Possible API Bug: HTML "301 Moved Permanently" (Solved!)

Avatar image for comictagger
comictagger

39

Forum Posts

8

Wiki Points

0

Followers

Reviews: 0

User Lists: 0

#1  Edited By comictagger

This is odd, and I'm not sure where the issue is.

I have code that worked before, and I don't know if I need to change something, or it's an issue on the CV side.

I am requesting issue data with an URL that looks like this:

http://api.comicvine.com/issue/334462/?api_key=27431e6787042105bd3e47e169a624521f89f3a4&format=json&field_list=image,publish_month,publish_year,site_detail_url

If I manually past the URL into a browser, I get the expect JSON response. However, my program is getting a response that is some HTML that looks like like this:

<html>

<head><title>301 Moved Permanently</title></head>

<body bgcolor="white">

<center><h1>301 Moved Permanently</h1></center>

<hr><center>nginx/1.2.7</center>

</body>

</html>

It's weird because other fetches that are done in similar fashion are working fine. Is it a cookie issue, possibly? Any ComicVine API gurus have any suggestions for me?

Thanks!

Avatar image for comictagger
comictagger

39

Forum Posts

8

Wiki Points

0

Followers

Reviews: 0

User Lists: 0

My bad!

Looks like the QT module I was using for an asynchronous fetch was not automatically following a redirect, like I thought it would.

I changed my requesting URL "http://api.comicvine.com" to "http://www.comicvine.com/api" and it's just working.