We've retired the forum in favor of GitHub Discussions.

New conversations can be started on GitHub. Existing conversations will remain for a while longer.

Head over to GitHub →

Allow call Hooks to have results, or expose the Response object

Erin Dalzell March 31, 2015 by Erin Dalzell

I'm trying to hook Statamic/Raven into Zapier and I'm almost there. I need a hook to return data. Problem is that by default a hook called externally (/TRIGGER/myhook/action) can not return anything (easily).

So then I could get access to the Slim Request object I was hopeful I could access the Response object, but it is private. This leaves me to do ugly code like this in my hook:

header('Content-Type: application/json');
echo(json_encode(array("id"=>"foo", "name"=>"Erin")));

Please make this a smidge easier to do.

>>>>>>> Unanswered <<<<<<<
1 Reply
1 Follower