What is the difference between WebService and data returned by obtaining postget? What is the difference between directly returning data by obtaining the post/get value and Web Service? What are the advantages and disadvantages of the two?
Let's assume a simple API:
Get submits the userid and type. after obtaining the values, you can determine whether the userid exists in the database. if so, data is returned based on the type.
Which of the above two methods is better for this API?
Reply to discussion (solution)
From the perspective of data acquisition: all are the same
All provide data services
The difference is that the Web Service provides public data services and uses wsdl to specify the format and method of incoming and outgoing data.
Post/get provides private services. you have agreed on the data format in private.
Add
If you want to develop APIs for your website, I suggest using REST. Of course, intra-site use is also REST
In this way, you can publish the corresponding REST string when you need it. you do not need to develop the API separately.
Add
If you want to develop APIs for your website, I suggest using REST. Of course, intra-site use is also REST
In this way, you can publish the corresponding REST string when you need it. you do not need to develop the API separately.
Thank you, moderator.
In fact, the difference between RESTFul APIs and Web services is still unclear. Isn't REST a design pattern? So how to implement it? POST/GET?