LoginSignup
0
0

More than 3 years have passed since last update.

良いURIの設計とは

Last updated at Posted at 2020-02-04

(Webを支える技術を読んで)WebサービスやWeb APIを作る上でのURI設計の指針についてまとめる。

  • URIにプログラミング言語依存の拡張子を使用しない(.rb,.jspなど)
  • URIに実装依存のパス名を利用しない(cgi-binなど)
  • URIに言語のメソッド名を利用しない
  • URIにセッションIDを含まない
  • URIはリソースを表現する名詞とする

上の例外として、1つのリソースが複数の表現を持つ時、拡張子をつけることは推奨される。

例) 
http://example.jp/resource.html
http://example.jp/resource.json

参考

Webを支える技術 -HTTP、URI、HTML、そしてREST

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