The difference between webservice and http: 1. HTTPService is based on http protocol, while WebService is based on soap protocol; 2. HTTPService is more efficient, and WebService can handle more complex data types; 3. Cross-domain processing is different.
#The operating environment of this article: Windows 7 system, Dell G3 computer.
The difference between webservice interface and http (httpclient) interface
Two commonly used protocol methods:
1. Based on different protocols: HTTPService is based on http protocol, WebService is based on soap protocol;
2. The data processing efficiency is different: HTTPService is more efficient, and WebService can handle more complex data types.
The http protocol supports the client/server mode, which is simple and fast. When the client requests services from the server, it only needs to transmit the request method and flexible path. HTTP allows the transmission of any type of data object. Connectionless, that is, limiting each connection to only process one request, which can save transmission time.
3. Cross-domain processing: HttpService cannot handle cross-domain. If you call a service from another application, you must use webService. Simply put
httpservice gets what you want through post and get.
Webservice uses soap protocol to get what you want. Compared with httpservice, it can handle more complex data types.
When you want to call the content of your service, without involving cross-domain issues, you can use HttpService.
If you need to call a service of another application in the background, at this time, you must use webService to call it.
For more related knowledge, please visit the FAQ column!
The above is the detailed content of The difference between webservice and http. For more information, please follow other related articles on the PHP Chinese website!