Recent content by Ben Fillmore

  1. Ben Fillmore

    XF 2.0 Using the POST method instead of GET.

    @AddonFlare because I'm developing a minimal external API, and won't have a CSRF token. I'm authenticating each request with HTTP Basic Auth instead. @yoloswaggerino I truly wish it had given me a 5xx response code. But alas, it didn't, and I spent a lot of time trolling through the codebase...
  2. Ben Fillmore

    XF 2.0 Using the POST method instead of GET.

    And after trolling through the XF Code for almost 2 hours, I figured it out. CSRF Tokens. I just wish it all hadn't failed silently. I cheated and added this function to my controller to bypass the checks. public function checkCsrfIfNeeded($action, \XF\Mvc\ParameterBag $params) { return; }
  3. Ben Fillmore

    XF 2.0 XF2 creating addon via CLI and I continue to get "no Such file or directory"

    Doesn't look like you've connected to your ScotchBox. Go to the base directory and enter vagrant ssh. This should connect you to your vagrant box. Go to the xenforo directory, probably somewhere in /var/www/, and run the command from there.
  4. Ben Fillmore

    XF 2.0 Using the POST method instead of GET.

    Is there some kind of trick to getting this to work? My the action on my controller responds perfectly well to GET requests, but doesn't seem to be hit when I make the same request as a POST. public function actionTest(\XF\Mvc\ParameterBag $params) { die("HERE"); }
  5. Ben Fillmore

    XF 2.0 Proper way to return JSON

    Sorry to pull up an old thread, but I try this: public function actionTest(){ $this->setResponseType('json'); return $this->view('Em8er\Auth:API', '', ["foo" => "bar"]); } And the response I get is this...
Top Bottom