0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 3 years have passed since last update.

basicnetwork.performrequest: unexpected response code 301

Last updated at Posted at 2020-12-19

Volleyを使ってAPIのJSONデータをGETリクエストし、画面上にデータを表示する段階でぼくが詰まったエラーについて書きます。
(日本語の情報がなかったので)

これってどんなエラー?

HTTPエラー301なので、リクエストされたリソースの URL が永遠に変更されたことを示しているとのこと。つまり、リクエストしたURLがもう存在しないということだそうです。

原因

URLをシンプルに間違えていた。(APIではないURLをリクエストしていた。)

解決策

正しいAPIのURLに直す。

参考記事
https://www.xspdf.com/resolution/50749783.html#:~:text=performRequest%3A%20Unexpected%20response%20code%20301%20%2C%20HTTP%20code%20301%20means%20%22,reach%20is%20no%20longer%20there.&text=%22moved%20permanently%22.-,This%20means%20the%20URL%20you're%20trying,reach%20is%20no%20longer%20there.

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?