zoukankan      html  css  js  c++  java
  • REST简介

    之前一直对REST(REpresentational State Transfer)的中文翻译(表述性状态转移)有些疑问,不明白这个表述和转移到底意味着什么,转态在这里又指什么。今天刚好看到一篇文章,现在想想其实我们的翻译就是对英文的直译,相关的词汇要放到英文的语境下意思才能凸显。文章的链接放在下面了,中间摘录几个对于represent和state和transfer的具体英文语境含义有表示的句子,以做备忘

    There is plenty of nuance to consider from Roy Fielding’s original dissertation on REST, but understanding resources is critical to understanding REST. To learn what a resource is, and how it can be represented using APIs, let’s consider my own personal Facebook presence, where I am a resource. I can view an HTML representation of my resource at:

    • GET https://www.facebook.com/kinlane/

    My profile is a single resource available on Facebook. I can view a representation of that resource in HTML using that URL in my web browser. I can also view another representation of it using the Facebook Graph API.

    • GET https://graph.facebook.com/v7.0/me

    这句话说明REST关注的是资源,”represent “指用不同的API表示不同的资源形式

    Naming, organizing, and making digital resources in this way are the seeds of REST. Now that you have your resources well-defined, you can GET these resources. More importantly, you can also manage each resource’s state over time—adding new ones, updating, transforming, and deleting existing ones. This allows for a handful of operations on each resource using HTTP methods:

    • GET: https://graph.facebook.com/v7.0/images
    • POST: https://graph.facebook.com/v7.0/images
    • PUT: https://graph.facebook.com/v7.0/images
    • DELETE: https://graph.facebook.com/v7.0/images

    这段话表明REST关注于以特定的命名形式组织以及使数字资源在互联网上可用,同时资源的状态(“state”,即增删改)也可以随着时间进行转变(“transfer”)

    参考链接:

    https://blog.postman.com/rest-api-definition/

  • 相关阅读:
    21:动量与学习率衰减
    20:减弱过拟合
    19:train-val-test划分(以检测过拟合挑选最好的模型参数)
    18:激活函数与GPU加速
    17:全连接网络的创建以及参数优化(创建,训练,测试[计算准确度],可视化)以及Flatten层的自定义代码
    小程序获取视频播放的长度
    小程序传参简单理解
    小程序导航的应用
    小程序底部导航
    小程序手机登陆 定时器 清除定时器
  • 原文地址:https://www.cnblogs.com/marshwinter/p/13653426.html
Copyright © 2011-2022 走看看