What is the difference between WebService and get post/get returned data? -Php Tutorial

Source: Internet
Author: User
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?

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.