1
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 5 years have passed since last update.

【超初心者向け】サーバーを郵便窓口に例えてみた

Last updated at Posted at 2019-05-12

サーバーに関しての知識が皆無だったので、Qiitaでのアウトプットの練習も兼ねてまとめてみた。

サーバーを郵便局の窓口に例えて説明してみることにする。

サーバーの仕組み

郵便物(データ)を送ってくださいと郵便窓口(サーバー)に伝えて(リクエスト)お金を払うと結果的に送り先に送ってくれる。

これがシンプルなサーバーの仕組み。

GETとPOST

郵便物(データ)の送り方の違い。

GET(郵便物を梱包せずに丸出しのまま送る)

・梱包していないので送るときに周りの客に何送るかわかってしまう
・梱包せずに送るのでまとめて大量に送ることはできない

POST(郵便物を梱包して送る)

・何を送るか周囲にバレないで済む
・梱包するので一度に大量の物をまとめて送ることができる

API

電報のような仕組み。

必要な情報を用意すると送り先に文章を配達してくれる。(情報を元に理想とする形に変換して送信してくれる)

1
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
1
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?