Protocol for the Restful Web service-http application Layer

Source: Internet
Author: User

HTTP is present here as an Application layer protocol . Understanding the Application layer protocol is critical because in many cases we use HTTP as a transport protocol. HTTP in soap is used as a transport protocol.

  • GETPOSTPUT, there areDELETEis the action defined on the resource. With these operations, we do not need to define what getxxx, Createxxx ...

  • server-side and customer-to-HTTP interaction for various libraries, servers, proxies, caches, and other tools with visibility . The visibility described here is an attribute of the HTTP protocol's off-the-go reuse.

The visibility of the protocol can produce the following characteristics:

Cache

When a response (Respones) related resource changes, the cached response is automatically invalidated.

Optimistic concurrency control

When concurrent writes occur, write requests based on outdated resources are blocked.

Content negotiation

For resources, you can choose different forms of presentation.

Security and Idempotent

A system HTTP operation can be repeatedly manipulated on resources.

If the protocol is not visible, it is not certain that the above characteristics exist.


To ensure the visibility of HTTP, HTTP uses the following means to achieve its goal:


    • Non-stateful interaction. HTTP does not require a previous request or response to determine the status of the current request or response.

    • Use the same interface method: Options, HEAD, GET, PUT, POST, DELETE, TRACE

    • Use The envelope format of the Mime-li ke to define different resource representations

    • Use the correct status code to indicate the request result


Security (Safety) and idempotent (Idempotency) HTTP methods

Safe-No side effects (side effect)

Idempotent-The client's duplicate request has the same effect

Method Safty Idempotency

Get Yes Yes

Head Yes Yes

Options Yes Yes

Put No Yes

Delete No Yes

Post No No







Protocol for the Restful Web service-http application Layer

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.