Some requests in the system are ajax, whether they use the api interface or are processed directly and return json.

WBOY
Release: 2016-08-04 09:20:35
Original
955 people have browsed it

Non-single page application
For example, the POST request to save an article uses JS asynchronously, which is an AJAX request
It used to be http://www.test.com/content/save, but the save address was changed to json return
You need to use this part Is the new address http://www.test.com/api/conte... For example, the API interface used?

Reply content:

Non-single page application
For example, the POST request to save an article uses JS asynchronously, which is an AJAX request
It used to be http://www.test.com/content/save, but the save address was changed to json return
You need to use this part Is the new address http://www.test.com/api/conte... For example, the API interface used?

It depends on how you write the code, the url is just a routing.
The main code level should have a unified API access layer to return unified result data.

Related labels:
php
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template