• Rest之路


    What is REST ?

    REST 是 REpresentational State Transfer 的缩写。是一种基于HTTP协议来进行进行数据交换的web标准框架。她的思想是:视组件为资源。REST可以分成Client与Server。顾名思义,server用来提供资源,client用来呈现资源。在Rest中的每一个资源都可以被URL所描述和定义。在REST有多种表现形式中(text, xml etc...),JSON成为了目前最为流行的一种方式。

    HTTP Methods

    以下是常见的HTTP方法,她们构成REST基础架构的一部分。 

    GET - Provides a read only access to a resource.

    PUT - Used to create a new resource. 

    DELETE - Used to remove a resource.

    POST - Used to update a existing resource or create a new resource.

     

    OPTIONS - Used to get the supported operations on a resource.

    RESTFul Web Services

    web service 是由许多协议和标准共同构建的,用于在系统与软件之间传递数据的集合。她不受编程语言以及平台(OS)的限制,只需通过网络以及HTTP协议,即可完成数据交换的工作。

    RESTful web services 是一种基于REST架构的,使用HTTP方法实现 web service 实现。她通常讲service定义为URI (Uniform Resource Identifier),并将资源JSON +一组 HTTP Methods 的方式提供/暴露给调用者。

    A sample of  RESTFul Web Services

    This tutorial will create a web service say user management with following functionalities

    Sr. No.HTTP MethodURIOperationOperation Type
    1 GET /UserService/users Get list of users Read Only
    2 GET /UserService/users/1 Get User with Id 1 Read Only
    3 PUT /UserService/users/2 Insert User with Id 2 Idempotent
    4 POST /UserService/users/2 Update User with Id 2 N/A
    5 DELETE /UserService/users/1 Delete User with Id 1 Idempotent
    6 OPTIONS /UserService/users List the supported operations in web service Read Only

  • 相关阅读:
    websphere安装及部署
    ant的安装及使用
    JAVA多线程线程阻塞与唤醒
    Win2008 404 找不到文件或目录。
    cmd命令大全和IIS服务命令
    phpcgi.exe上传大量数据
    phpcgi.exe多个进程 ,cpu跑满
    php shopex显示乱码
    ie中td空值不显示边框解决办法
    Win2003服务器主机下无法/不能播放FLV视频的设置方法!
  • 原文地址:https://www.cnblogs.com/atuotuo/p/6271253.html
Copyright © 2020-2023  润新知