Goodreads Developers discussion

questions > gets Response status: 301 message: Moved Permanently

Comments Showing 1-2 of 2 (2 new)    post a comment »
dateDown arrow    newest »

message 1: by Deb (new)

Deb B | 2 comments I am posting the following API request and it's returning an error (below), even though when I paste the request into a browser, it returns valid results.

API request:

Error Received:
AbstractHttpConnection.get(): Error connecting to server: Response status: 301 message: Moved Permanently

message 2: by Jon (new)

Jon (divisionbyzero) | 21 comments we recently started enforcing proper Host: headers in all of our requests and i think this is what's causing you issues.

if make that request like this:

GET /group/show/742-christian-fiction-devourers?format=xml&key=Ohxq73wv2HzSqIYz5kviNA HTTP/1.0

i get redirected because there's no Host header specified. if i add one the request succeeds:

GET /group/show/742-christian-fiction-devourers?format=xml&key=Ohxq73wv2HzSqIYz5kviNA HTTP/1.0

this also works if i make this request (with or without the Host: header):


so i think all you need to do is look at your http library and see how to specify this header.

back to top