Network API is similar to the network address ajax request to the server, the only difference is that this request has a lot of rules, and must request to the server, the request can not be locally
The internet
send request:
wx.request () initiates a network request parameters https: Object
Object attributes:
url: a string type developer interface address of the server (and has many restrictions must be https request of the network)
Figure:
If we do not have a legitimate domain name, it can be tested:
We need options for debugging foundation libraries were like a tick
data: String Parameter Type / Object / array / buffer request
header: set the type of object request header (return value data, the default format is json, we know that the server request data is a string)
method: string type requested manner:
Property Value: options / get / head / post / put / delete / tract / connect mode request which is
dataType: Returns a string type data format
Property Value: json will return the data to json, if not, the data will return once JSON.parse ()
other