Coder Social home page Coder Social logo

cakephp-rest's People

Contributors

narendravaghela avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

cakephp-rest's Issues

CSRF Token mismatch

Hi,

Firstly, thanks for your work !

I installed your plugin, I am working with CakePHP 3.7.

The problem is that I can't acceed to my page to add an user for example.
The error message is :

CSRF token mismatch. Cake\Http\Exception\InvalidCsrfTokenException
Documentation API

If you want to customize this error message, create src/Template/Error/error400.ctp
toggle vendor stack frames

    ⟩ Cake\Http\Middleware\CsrfProtectionMiddleware->_validateToken CORE/src/Http/Middleware/CsrfProtectionMiddleware.php, line 120

I understand that the problem is about the CSRF, I tried to resolved with a lot of solution but nothing to do, I don't understand why.

I tried to change the route, to remove :
// $routes->applyMiddleware('csrf');

All solutions to disable the CSRF on this page what I found on internet (Google) don't work.

When I access to the page for the view without send POST, the page works.

Thank you by advance.

How can i get a result without named variable

Hi, i'm trying to get a serialized result to ommit the name or variable on result.

How can i get the same result like using the $this->set('_serialize', 'varname'); in this plugin?

i want to get a result like this

{ "status": "OK", "result": { "falanu": [ "dhikanu", "tamburo" ] } }

instead of:

{ "status":"OK","result": { "bar": { "falanu": [ "dhikanu", "tamburo" ] } } }

without putting the name variable what i'm using in the response

thank you

AppController extends wrong BaseController

hi!
I think this part: class AppController extends BaseController
BaseController should be taken from
use Cake\Controller\Controller as BaseController;
not from
use App\Controller\AppController as BaseController;
As App\Controller\AppController may have logic which interfer with API logic

Call to undefined method App\Controller\ErrorController::getResponse()

I am using Cake PHP 3.4.2 and install this plugin using this command composer require sprintcube/cakephp-rest

Then I followed this simple tutorial https://www.codementor.io/@narendravaghela/building-rest-apis-using-cakephp-3-x-k9br8qo2a

But got the error code Call to undefined method App\Controller\ErrorController::getResponse()

I do not understand why getResponse() undefined method in /vendor/sprintcube/cakephp-rest/src/Error/RestExceptionRendered.php file

Please give me some insights

CakePHP 4

Is there any chance of an official update to this plugin to support CakePHP 4?
At present, we are updating an application, and have successfully ported everything to Cake4 via the upgrade guide.
The last step is the actual update to CakePHP 4 via a composer update, which can't happen while the sprintcube/cakephp-rest plugin is requiring "cakephp/cakephp": "^3.4.0"

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.