测试 REST API 的最佳方法是什么? [英] Best way to test out a REST API?
问题描述
我刚刚使用 PHP Slim 框架创建了一个 REST API.但是,我想知道测试此 API 的最佳方法是什么.最好使用 PHP 或 Objective-c(将在何处使用)或通过一些允许您测试 REST API 的在线服务来测试它?所有输出都是 JSON.
I just created a REST API using the PHP Slim Framework. However, I would like to know what the best way would be to test out this API would be. Is it best to test it out using PHP or objective-c (where it will be used) or via some online service which allows you to test out a REST API? All outputs are in JSON.
推荐答案
正如@Martin 所说,正确实现的 REST 独立于客户端(假设它支持您的表示类型).因此,例如,您可以使用 Poster Firefox 插件,或 RestClient 2.3.
As @Martin says, REST implemented properly is independent of the client (assuming it supports your representation types). So for example you can use the Poster add-on for Firefox, or RestClient 2.3.
这篇关于测试 REST API 的最佳方法是什么?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!