A
A
alex stephen2015-07-17 15:46:26
Yii
alex stephen, 2015-07-17 15:46:26

Yii2: how to accept only post requests for action?

Subject. GET requests work fine. I send a post request - a 404 is issued.

Answer the question

In order to leave comments, you need to log in

3 answer(s)
E
Egor Mokeev, 2015-07-17
@berezuev

Perhaps you are using action parameters that only work for GET requests
www.yiiframework.com/doc-2.0/guide-structure-contr...

A
Anton, 2015-07-17
@karminski

Actually, there is a wonderful thing in Yii2 like filters. You need a VerbFilter. Smoke manuals here: www.yiiframework.com/doc-2.0/yii-filters-verbfilte...

T
theded, 2015-07-17
@theded

routes are probably spelled incorrectly... there is no option for missing parameters

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question