Home > Backend Development > PHP Tutorial > 请问REST API如何设计

请问REST API如何设计

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
Release: 2016-06-06 20:14:34
Original
925 people have browsed it

现在需要使用php做一个云盘,实现文件的上传、下载、删除以及文件夹的浏览等。
请问如何设计rest api接口?
比如上传test.txt文件到/files目录设计成:POST/files/test.txt。下载test.txt的话设计成GET/files/test.txt 可以吗?
有没有具体的实例啊?

回复内容:

现在需要使用php做一个云盘,实现文件的上传、下载、删除以及文件夹的浏览等。
请问如何设计rest api接口?
比如上传test.txt文件到/files目录设计成:POST/files/test.txt。下载test.txt的话设计成GET/files/test.txt 可以吗?
有没有具体的实例啊?

推荐 http://www.ruanyifeng.com/blog/2014/05/restful_api.html

restful是一种指南,或者说是规范

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
Latest Issues
php data acquisition?
From 1970-01-01 08:00:00
0
0
0
PHP extension intl
From 1970-01-01 08:00:00
0
0
0
How to learn php well
From 1970-01-01 08:00:00
0
0
0
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template