php restful api(包含PHP測試程式)

php restful api(包含PHP測試程式)

php restful api(包含PHP測試程式)



資料來源:https://github.com/lycheng423/RESTful

https://support.ladesk.com/061754-How-to-make-REST-calls-in-PHP


GITHUB: https://github.com/jash-git/php-restful-api


使用/ 測試 方法

 * 发送:
 * GET  http://localhost/phprestfulapi/class  列出所有班级
 * GET  http://localhost/phprestfulapi/class/1    获取指定班的信息
 * POST http://localhost/phprestfulapi/class?name=SAT班&count=23 新建一个班
 * PUT  http://localhost/phprestfulapi/class/1?name=SAT班&count=23  更新指定班的信息(全部信息)
 * PATCH  http://localhost/phprestfulapi/class/1?name=SAT班    更新指定班的信息(部分信息)
 * DELETE  http://localhost/phprestfulapi/class/1 删除指定班
 
http://localhost/phprestfulapi/curl_get_test.php
http://localhost/phprestfulapi/curl_post_test.php
http://localhost/phprestfulapi/curl_put_test.php
http://localhost/phprestfulapi/curl_delete_test.php

PS 可以直接在USBWEBSERVER使用

One thought on “php restful api(包含PHP測試程式)

jash.liao@qq.com 發表迴響 取消回覆

你的電子郵件位址並不會被公開。 必要欄位標記為 *