6 ms·
Dogpatch: HTTP API testing framework, written in PHP using curl
- synchrone 12y agoSorry, but http://codeception.com/docs/10-WebServices http://codeception.com/docs/10-WebServices
- blazehoof 12y agowhy sorry? we can't have more than one project on the same subject anymore? let's dump laravel then, because cake came first.. tsc tsc tsc.. anyway, seems like an easy tool to work with, will test later on. thanks!
- nodesocket 12y agoCreator of Dogpatch here. Let me know any questions or feedback you may have.
- pearjuice 12y agoYou should consider using Guzzle as the base HTTP client.
- johnnyfaehell 12y agoWhy? Seriously other than it's "best practice" why would you do that? You're creating a dependency on a multi-purpose http library when you have a very specific need. Also you have a dependency on curl, but you can use guzzle without curl so you would then need to do your own check to see if curl was enabled. Better off to have it as a hard dependency and use it yourself. Sometimes using premade libraries isn't the best option. I believe this may be one of them.
- treve 12y agoGuzzle is a massive dependency for being just a curl wrapper.
- astrodust 12y agoWhy not use it if it's available? Having support for more than one back-end is always nice.
- johnnyfaehell 12y agoIt does a lot more than just support one method of doing http requests. Also I'm pretty sure there are some stuff curl can do, which streams for example can't.
- xrstf 12y agoJust from looking over the source for a moment, I had a few questions/points: * Why doesn't the put() method have a parameter for the payload? Sending a PUT with headers only is .... uncommon to me. * How can I use this to test my JSON-based API? The $postData on post() requires an array, so I cannot put in my pre-encoded JSON payload. Maybe just remove the typehint? * prettyPrintJson() could use a version-switch and use JSON_PRETTY_PRINT in PHP 5.4+ -- results should look similar. I'll keep this in mind, could come in handy when testing the next API ;-)
- donatj 12y agoI wrote a similar tool 'Boomerang!' a little over a year ago after finding myself constantly irritated with Frisby.js's unresolvable issues. It has some more advanced tools for validating the structure of the JSON than Dogpatch appears to, and can validate headers and urls along a redirect path. https://github.com/donatj/Boomerang https://github.com/donatj/Boomerang / http://boomerang.so http://boomerang.so