URL address format


1. The traditional form of URL

+ Format: schema: // host: port / path query # fragment?

  -schema: protocols, such as http, https, ftp, etc.

  -host: domain name or ip address

  -port: port, http port 80 by default and can be omitted

  -path: path, for example / abc / a / b / c

  -query: query parameters, such as token = sdfs2223fds2 & name = sdffaf

  -fragment: Anchor (hash Hash), a location for positioning of the page.

+ Conform to the rules of URL

  - http://www.baidu.com/java/web?flag=1#function


 

2.Restful form of URL

+ HTTP request method

  - GET query

  Add -POST

  -PUT modification

  -DELETE delete

+ Conform to the rules of the URL address

  - http://www.baidu.com/books  GET

  - http://www.baidu.com/books  POST

  - http://www.baidu.com/books/123  PUT

  - http://www.baidu.com/books/123  DELETE

 

 

 

 

 

Guess you like

Origin www.cnblogs.com/liea/p/11786006.html