Cetia41.1 documentation-2.4

Source: Internet
Author: User
The 2.4 _ typeHTTP parameter sometimes indicates that an xml request is sent by a framework. We only need one or no permission to control the http header sent to the server. This often happens when ajax technology is used. In this case, the browser has time to request the html response (homepage), and sometimes the xml response (special content ). The problem with this scenario is:

The 2.4 _ type HTTP parameter sometimes indicates that an xml request is sent by a framework. We only need one or no permission to control the http header sent to the server. This often happens when ajax technology is used. In this case, the browser has time to request the html response (homepage), and sometimes the xml response (special content ). The problem with this scenario is:

HTTP parameters of 2.4 _ type

Sometimes an xml request may represent a framework. We only use one or no permission to control the http header sent to the server. This often happens when ajax technology is used. In this case, the browser has time to request the html response (homepage), and sometimes the xml response (special content ). The problem in this scenario is that, from the server perspective, the headers of html and xml requests sent by the browser are the same. In this case, the framework will always use html requests even if we want xml responses. The Accept field of the http header should be text/html.
_ Type HTTP is used to solve this problem. The _ type parameter value can be web or r ws_stateless (ws), which indicates the desired response type, regardless of how the http header is set from the client to the server.
The following is an example of a url that requires a traditional web response:
Http://example.com/forum/topics? _ Type = web
The following is an example of a url that expects an xml web service response:
Http://example.com/forum/topics? _ Type = ws_stateless
Or the following convenient shorthand form:
Http://example.com/forum/topics? _ Type = ws
The usage of this parameter is displayed. As described above, the type parameter overwrites the http header parameter:




When you use a browser to directly test the xml render method, this method is also useful and you can see the results directly.

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.