FriendsOfSymfony / FOSRestBundle

This Bundle provides various tools to rapidly develop RESTful API's with Symfony
http://symfony.com/doc/master/bundles/FOSRestBundle/index.html
MIT License
2.79k stars 704 forks source link

Added HeaderParam Annotation #2271

Open isheglov opened 3 years ago

isheglov commented 3 years ago

Usage

This annotation could be used to check presence of header in request

    /**
     * @Rest\HeaderParam(name="best_header", nullable=false)
     */
    public function actionIndex()
    {
isheglov commented 3 years ago

@xabbuh is all good with this PR? Could we please merge it? Or shall I change anything? Thanks!