Post to an action URL fails, Get works I have a simple plugin that's expected POST data from a form:
&lt;form method=&quot;post&quot; action=&quot;&quot; accept-charset=&quot;UTF-8&quot;&gt;
    &lt;input type=&quot;hidden&quot; name=&quot;action&quot; value=&quot;{{ actionUrl('broadbean/jobs/new') }}&quot;&gt;

When I submit the form, that fails:

Page Not Found
Unable to resolve the request &quot;http:/craft.dev/index.php/admin/actions/broadbean/jobs/new&quot;.

If I cut and paste that URL into a new window, I get the plugin response, so what gives here? The plugin is set up to allow anonymous access (but I'm submitting the form from within an admin view anyway).
EDIT:
According to http://buildwithcraft.com/docs/plugins/controllers#posting-to-controller-actions I should be able to put the action URL in a hidden field, which I've done. If I dispense with that and instead put the actionUrl() directly in the form's action parameter, everything works.
Is this a bug? This is on Craft 2.2.2601.
EDIT:
Controller code:
class Broadbean_JobsController extends BaseController
{
    protected $allowAnonymous = true;

    public function actionNew()
    {    
        $this-&gt;requirePostRequest();

        $result = craft()-&gt;broadbean_jobs-&gt;createJob();
        
        var_dump(array(
            'message' =&gt; ($result['success']) ? Craft::t('Job created.') : Craft::t('Unable to create job.'),
            'values' =&gt; craft()-&gt;request-&gt;getPost(),
            'errors' =&gt; $result['errors']
        ));

    }
}
I believe that when you post data using name='action' from a form that craft automatically uses the actionUrl to route the request properly, so that if your controller is here:

/craft/plugins/broadbean/controllers/Broadbean_JobsController.php


with a method actionNew, then craft will create the action route broadbean/jobs/new automatically:

&lt;input type="hidden" name="action" value="broadbean/jobs/new"&gt;


On the other hand if you are linking directly then craft doesn't know to use the action route, so you need to explicitly tell it that this is an action request:

&lt;a href="{{ actionUrl('broadbean/jobs/new', { id: 10 }) }}"&gt;


or from javascript:

var url = Craft.getActionUrl('broadbean/jobs/new', { id: 10 });


If you were to call the action externally then you would have to write the full action url without the benefit of using the automatic config routing:

http://mysite.com/actions/broadbean/jobs/new?id=10


or, if the admin had, for example, set up a custom actionUrl in the config file:

http://mysite.com/methods/broadbean/jobs/new?id=10