リファクタリングとともに生きるラジオ

#59 更新系API① POST/PUTのレスポンスどうする?


Listen Later

■ トピック

  • shinshinさんからのおたより
  • 寿司回で気になっていた、POST/PUTのレスポンスについて
  • If one or more resources has been created on the origin server as a result of successfully processing a POST request, the origin server SHOULD send a 201 (Created) response containing a Location header field that provides an identifier for the primary resource created and a representation that describes the status of the request while referring to the new resource(s).
  • アプリケーションで使わないレスポンスの必要性
  • イミュータブルな単方向データフローにしたい
  • 富豪的プログラミング
  • Responses to POST requests are only cacheable when they include explicit freshness information and a Content-Location header field that has the same value as the POST's target URI.
  • POSTのキャッシュ可能性
  • Webブラウザのために仕様に準拠する
  • PUTの話
  • If the target resource does have a current representation and that representation is successfully modified in accordance with the state of the enclosed representation, then the origin server MUST send either a 200 (OK) or a 204 (No Content) response to indicate successful completion of the request.
  • PUTのレスポンスはキャッシュできない
  • SHOULDでも従っておいたほうがよさそう
  • 内容に間違いがあることを前提に聞いてください
  • 次回はリクエストのスキーマについて
  • ■ 参考リンク

    • RFC 9110 - HTTP Semantics
    • RFC 9110 — HTTP Semantics (日本語訳)

    • ■ おたよりフォーム

      https://forms.gle/RYUG7T4ctmF7Srf36


      ■ X(Twitter)

      https://twitter.com/refactoradio

      ■ Bluesky

      https://bsky.app/profile/refactoradio.com

      ハッシュタグは #リファラジ です。

      ...more
      View all episodesView all episodes
      Download on the App Store

      リファクタリングとともに生きるラジオBy リファラジ


      More shows like リファクタリングとともに生きるラジオ

      View all
      Rebuild by Tatsuhiko Miyagawa

      Rebuild

      51 Listeners

      backspace.fm by backspace.fm

      backspace.fm

      12 Listeners

      fukabori.fm by iwashi

      fukabori.fm

      2 Listeners

      Off Topic // オフトピック by Off Topic

      Off Topic // オフトピック

      16 Listeners

      歴史を面白く学ぶコテンラジオ (COTEN RADIO) by COTEN inc.

      歴史を面白く学ぶコテンラジオ (COTEN RADIO)

      226 Listeners

      UIT INSIDE by UIT

      UIT INSIDE

      0 Listeners

      サイエンマニア | サイエンスっぽいマニアなハナシ by 研究者レン from サイエントーク

      サイエンマニア | サイエンスっぽいマニアなハナシ

      4 Listeners

      ひまじんプログラマーの週末エンジニアリングレッスン by ひまじんプログラマー

      ひまじんプログラマーの週末エンジニアリングレッスン

      0 Listeners

      ゆるコンピュータ科学ラジオ by ゆるコンピュータ科学ラジオ

      ゆるコンピュータ科学ラジオ

      15 Listeners

      Podcast by Yuka Studio // ユカスタポッドキャスト by Podcast by Yuka Studio

      Podcast by Yuka Studio // ユカスタポッドキャスト

      3 Listeners

      となりのデータ分析屋さん by 佐々木亮とたっちゃん

      となりのデータ分析屋さん

      0 Listeners

      日本一たのしい哲学ラジオ by 日本一たのしい哲学ラジオ

      日本一たのしい哲学ラジオ

      11 Listeners

      サイボウズ フロントエンド通信 by サイボウズ フロントエンド通信委員会

      サイボウズ フロントエンド通信

      0 Listeners

      ハイパー起業ラジオ by 尾原和啓 / けんすう

      ハイパー起業ラジオ

      0 Listeners

      耳で学ぶAI、ロボシンク by 矢野 哲平

      耳で学ぶAI、ロボシンク

      0 Listeners