Upgrade to Pro — share decks privately, control downloads, hide ads and more …

REST 6+4の制約

REST 6+4の制約

Akihito Koriyama

December 01, 2019
Tweet

More Decks by Akihito Koriyama

Other Decks in Programming

Transcript

  1. "1*˺8FC w " Ϋϩʔζυͳ؀ڥ w # )551 $36% 31$ 

    w $ 3&45 ௿͍ࢀೖোน ֦ுੑ Πϯλʔωοτن໛ ௿͍ࢀೖোน ֦ுੑ ϋΠύʔϝσΟΞ ௿͍ࢀೖোน ֦ுੑ Πϯλʔωοτن໛ Πϯλʔωοτن໛
  2. wΫϥΠΞϯτʗαʔό wεςʔτϨεੑ wΩϟογϡ w֊૚ԽγεςϜ w ίʔυΦϯσϚϯυ  w౷ҰΠϯλϑΣʔεɹ ΠϯλʔϑΣΠε੍໿ʣ wϦιʔεͷࣝผ

    63*  wදݱʹΑΔϦιʔεૢ࡞ wࣗݾهड़తϝοηʔδ wϋΠύʔϝσΟΞ੍໿ )"5&0"4 3&45ʢ'JFMEJOHʣ੍໿ 29 https://www.ics.uci.edu/~fielding/pubs/dissertation/rest_arch_style.htm ΞʔΩςΫνϟ੍໿ ΠϯλʔϑΣΠε੍໿
  3. Ωϟογϡઃܭ w OPTUPSF  ΩϟογϡෆՄೳʁʣ w OPDBDIF ʢ౎౓֬ೝඞཁʁʣ w QVCMJD

    QSJWBUF  w NVTUSFWBMJEBUF ʢظݶ੾Ε࢖͑Δʁ  w NBYBHF  w &5BHΛ෇Ճ https://developers.google.com/web/fundamentals/performance/optimizing-content-efficiency/http-caching?hl=ja
  4. $ curl -i http://example.com 
 HTTP/1.1 200 OK Content-Type: application/json

    Link: <http://example.com/profile>; rel="profile" { "wtl": "MjAxMy0wNS0wNiAxMjo1Nzo1MyAtMDcwMA==\n", “grobb34s": […] } $ curl -i http://example.com/profile
 HTTP/1.1 200 OK Content-Type: text/plain 
 The Example.com API =================== Example.com provides access to our blog through an API. In the API, you'll see two major things of interest: `wtl` and `grobb34s` ## wtl The value provided under the `wtl` key is the time the latest blog post was posted, in "%Y-%m-%d %H:%M:%S %z" format. This value is then Base64 encoded. http://www.designinghypermediaapis.com/blog/the-profile-link-relation-and-you.html