Talking about WebService SOAP, Restful, HTTP (Post/get) requests

Source: Internet
Author: User
Tags http post soap representational state transfer

Abstract: Webservice two implementations with HTTP (post/get) directly request each of the pros and cons, and how to determine which of the choices to use. Http-get and Http-post

Http-get and Http-post are standard protocols that use HTTP (Hypertext Transfer Protocol) predicates (predicates refer to the process of returning a true or false evaluation of a conditional expression. The parameter is encoded and passed as a name/value pair, and the associated request semantics are used. Each protocol contains a series of HTTP request headers, HTTP request headers, and other information that defines what the client requests to the server, which server responds with a series of HTTP response headers and the requested data.

Http-get uses the MIME type application/x-www-form-urlencoded (which is appended to the URL of the server that handles the request) to pass its parameters as URL-encoded text. URL encoding is a form of character encoding that ensures that the passed arguments contain consistent text, such as encoding a space as%20, and other symbols to%xx, where XX is the ASCII (or ISO Latin-1) value that the symbol represents in 16 binary notation. The appended parameter is also known as a query string.

Similar to Http-get, the Http-post parameter is URL-encoded. However, the name/value pair is passed inside the actual HTTP request message, not as part of the URL.

Our daily websites and systems use this form to access our applications.

Web Service (SOAP)

One of the most basic purposes of webservice is to provide the ability to work together on different applications across different platforms.

A Web service is an application that exposes an API to the outside world that can be called through the web.

Soap is a simple XML-based lightweight protocol that exchanges structured information and type information on the user's web.

A SOAP request is a dedicated version of HTTP Post that follows a special XML message format Content-type set to: Text/xml Any data can be XML.

Restful

REST (representational state Transfer) is a lightweight Web service architecture that can be implemented entirely through the HTTP protocol . Its implementations and operations are more concise than soap and XML-RPC, and cache caches can be used to improve responsiveness, with better performance, efficiency, and ease of use than the SOAP protocol.
The rest schema's operations on resources, including fetching, creating, modifying, and deleting resources, correspond exactly to the get, POST, put, and Delete methods provided by the HTTP protocol (VERB)

The difference between SOAP and HTTP

Why do you want to learn Web service?

Most external interfaces implement Web service methods rather than HTTP methods, and if you don't, there's no way to dock.

is Web service relative to HTTP (post/get) good?

1. Interface implementation of the method and requirements of the parameters at a glance

2. Do not worry about capitalization issues

3. Don't worry about Chinese urlencode problem

4. The code does not have to declare the authentication (account, password) parameters

5. Pass parameters can be an array, object, etc...

is Web service relative to HTTP (post/get) fast?

The speed may be reduced due to XML parsing.

Can web service be replaced by HTTP (post/get)?

Yes, and now the open platform is implemented with HTTP (post/get).


The difference between restful and soap

Security: SOAP is better than restful

Efficiency and ease of use (rest wins)

Maturity (overall soap is better than rest in terms of maturity)

Talking about WebService SOAP, Restful, HTTP (Post/get) requests

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.