Article Directory
Request method
- get: is used to retrieve data, retreive the Data The specified from AT A Resource Server.
GET request is used to request data only, not modify any resources. It is a safe and effective way. - post: be used to send data to the API server to create or update a resource. It is used to transmit the data to the server to create or modify data. It is used to store data in the request body http request's.
- put:simlar to post.
- patch:
- delete:
Request
- Javax.servlet.http.HttpServletRequest
the GetHeader ()
the Return String detailed description of the request header, specified
the If request does not include the include A header of specified Not name, return null
the If for the same name, there are multiple headers, return the first method of this head in the request, the request to return the first head, the header name is case insensitive header names are case insensitive, you can use the any WHIS Method request header the this
Public java.lang.String getHeader (the java.lang. String name)
Response
JSON
- Analog data formats: a single data
{"a":"2.12","b":"2.12"}
- Array Format:
{"a":"",
[
{"b":"b1","c":"2.12"},
{"b":"b1","c":"2.12"}
]
}
- String format:
{
"engineeringId":"01",
"versionId":"01",
"documentId":"01",
"calculationFloor":"1楼",
"elevationList":["a","b"]
}
-
String [] ids and the Get Request List ids Post request differences and
at the same post requests the postman manner:
[ ". 1", "2", ". 3"]
GET request: param: ids 1,3 - -> last path / api / delete / ids = 1,3
the get request: String [] to the controller layer will be converted into { ". 1", ". 3"}
List <> is the form size = 2 -
List JSONArray turn sub-String
JSONArray.parseArray(JSON.toJSONString(ids)).toString
和JSON.toJSONString(ids)是等价的