

Dogpatch: HTTP API testing framework, written in PHP using curl - nodesocket
https://github.com/commando/dogpatch

======
xrstf
Just 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
I 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)

------
nodesocket
Creator of Dogpatch here. Let me know any questions or feedback you may have.

~~~
pearjuice
You should consider using Guzzle as the base HTTP client.

~~~
treve
Guzzle is a massive dependency for being just a curl wrapper.

~~~
astrodust
Why not use it if it's available?

Having support for more than one back-end is always nice.

~~~
johnnyfaehell
It 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.

------
synchrone
Sorry, but
[http://codeception.com/docs/10-WebServices](http://codeception.com/docs/10-WebServices)

~~~
blazehoof
why 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!

