The HTTP protocol in restful

Source: Internet
Author: User

Tag: Option network query server app body Request Understanding Update

RESTful is a resource-based software architecture style.

The so-called resources, is an entity on the network, or is a specific information on the network. A picture, a song is a resource.

The RESTful API is an implementation based on the HTTP protocol. (HTTP is an application-level protocol that is characterized by simplicity and speed).

HTTP protocol--Request

Composition format: Request line, message header, request body

Format: Method Request-uri http-version CRLF

eg:get/http/1.1 CRLF

Request Method:

Get: Request for the resource identified by Request-uri

"Post: Append new data after Request-uri identified resources

"HEAD: Request for a response message header for a resource identified by Request-uri

Put: Update resources are often used to request that the server store a resource and use Request-uri as its identity

Delete: The request server deletes the resource identified by the Request-uri

Options: Request performance from a query server or query for resource-related options and requirements

HTTP protocol--response

Composition format: status line, message header, response body

eg:http/1.1 OK

Common status Code

$ OK//client request succeeded

Bad Request//client requests have syntax errors and cannot be understood by the server

401 Unauthorized//server receives request, but refuses to provide service

404 Not Found//request resource does not exist

Internal Server error//server unexpected errors

503 Server Unavailable//server is currently unable to process client requests

The HTTP protocol in restful

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.