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